Re: [libvirt] [PATCH] use gnulib via a submodule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel P. Berrange wrote:
> On Tue, Jul 07, 2009 at 07:02:08PM +0200, Jim Meyering wrote:
>> @@ -5,7 +5,8 @@ AC_CONFIG_SRCDIR([src/libvirt.c])
>>  AC_CONFIG_AUX_DIR([build-aux])
>>  AM_CONFIG_HEADER([config.h])
>>  dnl Make automake keep quiet about wildcards & other GNUmake-isms
>> -AM_INIT_AUTOMAKE([-Wno-portability])
>> +AM_INIT_AUTOMAKE([1.11 color-tests parallel-tests -Wno-portability])
>> +AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
>>  AC_CANONICAL_HOST
>
> Actually an alternative idea - don't add a hard pre-requisite on 1.11.
> Instead just add a
>
>    m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
>
> ie, just provide a no-op AM_SILENT_RULES for older automake. Then we
> can just throw out 'mylibtool'. People with new enough automake will
> get the silent build support, and we can still have compatability with
> older automake for RHEL-5 albeit without silent build support.

I like that.

>From a0aeb1abb35968e68a547d6ccca6109845c3a7c6 Mon Sep 17 00:00:00 2001
From: Jim Meyering <jim@xxxxxxxxxxxx>
Date: Wed, 8 Jul 2009 11:51:59 +0200
Subject: [PATCH] use automake-1.11's silent-rules option, when possible

Don't use mylibtool, (subsumed by automake's silent rules)
Its use was causing a non-srcdir build to fail.
* Makefile.am (EXTRA_DIST): Remove mylibtool.
* configure.in: Don't use mylibtool.

* configure.in: Use AM_SILENT_RULES([yes]),
but only if that m4 macro is defined.
Thus, it works even on systems that lack automake-1.11.
Daniel Berrange suggested adding the conditional, so that
we don't have a hard requirement on 1.11, e.g., for RHEL5.
---
 Makefile.am  |    3 +--
 configure.in |    9 +++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index f874325..f9efff5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,8 +21,7 @@ EXTRA_DIST = \
   .x-sc_require_config_h \
   .x-sc_prohibit_nonreentrant \
   Makefile.nonreentrant \
-  autogen.sh \
-  mylibtool
+  autogen.sh

 man_MANS = virsh.1

diff --git a/configure.in b/configure.in
index 29c8867..552089a 100644
--- a/configure.in
+++ b/configure.in
@@ -6,6 +6,11 @@ AC_CONFIG_AUX_DIR([build-aux])
 AM_CONFIG_HEADER([config.h])
 dnl Make automake keep quiet about wildcards & other GNUmake-isms
 AM_INIT_AUTOMAKE([-Wno-portability])
+
+# Use the silent-rules feature when possible.
+m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
+AM_SILENT_RULES([yes])
+
 AC_CANONICAL_HOST

 LIBVIRT_MAJOR_VERSION=`echo $VERSION | awk -F. '{print $1}'`
@@ -58,10 +63,6 @@ dnl Support building Win32 DLLs (must appear *before* AM_PROG_LIBTOOL)
 AC_LIBTOOL_WIN32_DLL

 AM_PROG_LIBTOOL
-dnl Override normal libtool in favour of our quiet version
-LIBTOOL='$(SHELL) $(top_srcdir)/mylibtool'
-AC_SUBST([LIBTOOL])
-
 AM_PROG_CC_C_O

 VERSION_SCRIPT_FLAGS=-Wl,--version-script=
--
1.6.3.3.524.g8586b

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]