[libvirt] [PATCH] build: shut up automake warnings

I'm tired of seeing screenfuls of messages like these when using automake 1.13 (Fedora 19): configure.ac:2121: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged. configure.ac:2121: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead, configure.ac:2121: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files. daemon/Makefile.am:19: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') seeing as how we MUST use those constructs for the benefit of automake 1.9 (RHEL 5). Conversely, RHEL 5 automake complained: aclocal:configure.ac:36: warning: macro `AM_SILENT_RULES' not found in library Obviously, I tested this patch on both Fedora 19 and RHEL 5. * configure.ac (AM_INIT_AUTOMAKE): Avoid obsoletion warnings. (AM_SILENT_RULES): Avoid unknown macro warning. Signed-off-by: Eric Blake <eblake@redhat.com> --- configure.ac | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index f853e03..925afcd 100644 --- a/configure.ac +++ b/configure.ac @@ -21,8 +21,9 @@ AC_CONFIG_SRCDIR([src/libvirt.c]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) -dnl Make automake keep quiet about wildcards & other GNUmake-isms -AM_INIT_AUTOMAKE([-Wno-portability tar-ustar]) +dnl Make automake keep quiet about wildcards & other GNUmake-isms; also keep +dnl quiet about the fact that we intentionally cater to automake 1.9 +AM_INIT_AUTOMAKE([-Wno-portability -Wno-obsolete tar-ustar]) AM_MAINTAINER_MODE([enable]) # Maintainer note - comment this line out if you plan to rerun @@ -30,9 +31,11 @@ AM_MAINTAINER_MODE([enable]) # Leave it uncommented for normal releases, for faster ./configure. gl_ASSERT_NO_GNULIB_POSIXCHECK -# Use the silent-rules feature when possible. -m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])]) -AM_SILENT_RULES([yes]) +# Default to using the silent-rules feature when possible. Formatting +# chosen to bypass 'grep' checks that cause older automake to warn. +# Users (include rpm) can still change the default at configure time. +m4_ifndef([AM_SILENT_RULES], + [m4_define([AM_SILENT_RULES],[])])AM_SILENT_RULES([yes]) AC_CANONICAL_HOST -- 1.8.3.1

On Wed 04 Sep 2013 06:48:46 PM CEST, Eric Blake wrote:
I'm tired of seeing screenfuls of messages like these when using automake 1.13 (Fedora 19):
configure.ac:2121: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged. configure.ac:2121: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead, configure.ac:2121: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files. daemon/Makefile.am:19: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
These were driving me crazy, but I thought we had no other option than to leave this due to compatibility. Thanks for finding the way out of this. Unfortunately, 1.14 complains about subdir-objects way more than about anything else and I still haven't found the way out of that one.
seeing as how we MUST use those constructs for the benefit of automake 1.9 (RHEL 5). Conversely, RHEL 5 automake complained:
aclocal:configure.ac:36: warning: macro `AM_SILENT_RULES' not found in library
Obviously, I tested this patch on both Fedora 19 and RHEL 5.
* configure.ac (AM_INIT_AUTOMAKE): Avoid obsoletion warnings. (AM_SILENT_RULES): Avoid unknown macro warning.
Signed-off-by: Eric Blake <eblake@redhat.com> --- configure.ac | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac index f853e03..925afcd 100644 --- a/configure.ac +++ b/configure.ac @@ -21,8 +21,9 @@ AC_CONFIG_SRCDIR([src/libvirt.c]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) -dnl Make automake keep quiet about wildcards & other GNUmake-isms -AM_INIT_AUTOMAKE([-Wno-portability tar-ustar]) +dnl Make automake keep quiet about wildcards & other GNUmake-isms; also keep +dnl quiet about the fact that we intentionally cater to automake 1.9 +AM_INIT_AUTOMAKE([-Wno-portability -Wno-obsolete tar-ustar]) AM_MAINTAINER_MODE([enable])
# Maintainer note - comment this line out if you plan to rerun @@ -30,9 +31,11 @@ AM_MAINTAINER_MODE([enable]) # Leave it uncommented for normal releases, for faster ./configure. gl_ASSERT_NO_GNULIB_POSIXCHECK
-# Use the silent-rules feature when possible. -m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])]) -AM_SILENT_RULES([yes]) +# Default to using the silent-rules feature when possible. Formatting +# chosen to bypass 'grep' checks that cause older automake to warn. +# Users (include rpm) can still change the default at configure time. +m4_ifndef([AM_SILENT_RULES], + [m4_define([AM_SILENT_RULES],[])])AM_SILENT_RULES([yes])
Funny that only simple grep is used to identify these. ACK, Martin

On 09/05/2013 12:08 AM, Martin Kletzander wrote:
On Wed 04 Sep 2013 06:48:46 PM CEST, Eric Blake wrote:
I'm tired of seeing screenfuls of messages like these when using automake 1.13 (Fedora 19):
configure.ac:2121: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged. configure.ac:2121: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead, configure.ac:2121: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files. daemon/Makefile.am:19: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
These were driving me crazy, but I thought we had no other option than to leave this due to compatibility. Thanks for finding the way out of this.
Unfortunately, 1.14 complains about subdir-objects way more than about anything else and I still haven't found the way out of that one.
Ouch - rawhide is currently still stuck on 1.13.4 [so much for the perception of rawhide being bleeding-edge]; I'll have to manually install from automake.git to play with subdir-objects (it may be easiest to just unconditionally turn it on, after testing that RHEL 5's 1.9 can handle it), as a followup patch.
-# Use the silent-rules feature when possible. -m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])]) -AM_SILENT_RULES([yes]) +# Default to using the silent-rules feature when possible. Formatting +# chosen to bypass 'grep' checks that cause older automake to warn. +# Users (include rpm) can still change the default at configure time. +m4_ifndef([AM_SILENT_RULES], + [m4_define([AM_SILENT_RULES],[])])AM_SILENT_RULES([yes])
Funny that only simple grep is used to identify these.
Newer automake has been taught to use more-reliable m4 tracing instead of raw grep - but newer automake is the one that doesn't issue the warning. Yeah, I was rather shocked that this worked to shut up the warning on RHEL 5 :)
ACK,
Thanks; pushed. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 09/05/2013 07:04 AM, Eric Blake wrote:
Unfortunately, 1.14 complains about subdir-objects way more than about anything else and I still haven't found the way out of that one.
I found the way out (but with a caveat...) - you add 'subdir-objects' to the AM_INIT_AUTOMAKE line in configure.ac (portable back to RHEL 5's automake 1.9). But in doing so, automake then tries to create a directory named: ./src/$(srcdir)/remote/.deps among others (yes, that's the literal directory name it created). Which means we have a bug in our (ab)use of BUILT_SOURCES - we are can't ship generated .c files as part of the tarball and ALSO require that they be built first but into the srcdir. And since these are the very files that are already causing rpcgen grief on non-Linux platforms, we definitely still want to ship the generated .c, even if we don't store the generated files in git.
Ouch - rawhide is currently still stuck on 1.13.4 [so much for the perception of rawhide being bleeding-edge]; I'll have to manually install from automake.git to play with subdir-objects (it may be easiest to just unconditionally turn it on, after testing that RHEL 5's 1.9 can handle it), as a followup patch.
Well, I now have my environment set up to reproduce the problem with automake 1.14, and will hopefully have patches soon. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 09/05/2013 07:04 AM, Eric Blake wrote:
Unfortunately, 1.14 complains about subdir-objects way more than about anything else and I still haven't found the way out of that one.
Ouch - rawhide is currently still stuck on 1.13.4 [so much for the perception of rawhide being bleeding-edge]; I'll have to manually install from automake.git to play with subdir-objects (it may be easiest to just unconditionally turn it on, after testing that RHEL 5's 1.9 can handle it), as a followup patch.
Done here: https://www.redhat.com/archives/libvir-list/2013-September/msg00406.html -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Martin Kletzander