Re: [PATCHES] Better error messages if obsolete macros are used
On 12/30/2012 07:08 PM, Paolo Bonzini wrote: Il 30/12/2012 11:23, Stefano Lattarini ha scritto: +AC_DEFUN([AM_CONFIG_HEADER], +[AC_FATAL(['$0': this macro is obsolete. +You should use the 'AC][_CONFIG_HEADERS' macro instead.])]) + What's the point in doing this instead of m4_defun([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS]) or something like that? Issuing a fatal error will force users to upgrade to AC_CONFIG_HEADERS, thus allowing us to remove AM_CONFIG_HEADER altogether in future Automake versions (probably 1.15). 4, or maybe 1.15). Your patch is even longer than keeping backwards-compatibility... While this is true, consider that my new code is only meant to be temporary, lasting few releases in order to smooth the transition to the blessed AC_CONFIG_HEADERS. It is probably worth to add comments explaining this to the definitions in 'm4/obsolete-err.m4' file. And do the same for other obsolete/obsolescent constructs. I intend to push the patch below for that purpose. 8 8 8 8 8 8 8 8 8 From 3324c4a67dfc1643cfbb3c2262ffe75c7b04205d Mon Sep 17 00:00:00 2001 Message-Id: 3324c4a67dfc1643cfbb3c2262ffe75c7b04205d.1356944561.git.stefano.lattar...@gmail.com From: Stefano Lattarini stefano.lattar...@gmail.com Date: Mon, 31 Dec 2012 09:53:43 +0100 Subject: [PATCH] maint: state when compatibility cruft should be removed or warned about * automake.in: Here. * lib/Automake/Options.pm: And here. * m4/obsolete-err.m4: And here. Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com --- automake.in | 6 ++ lib/Automake/Options.pm | 3 +++ m4/obsolete-err.m4 | 3 +++ 3 files changed, 12 insertions(+) diff --git a/automake.in b/automake.in index 3194c99..2c5e803 100644 --- a/automake.in +++ b/automake.in @@ -2131,6 +2131,7 @@ sub handle_source_transform (%) msg_var ('unsupported', $ext_var, $ext_var-name . can assume at most one value) if $default_source_ext =~ /[\t ]/; (my $default_source = $unxformed) =~ s,(\.[^./\\]*)?$,$default_source_ext,; +# TODO: Remove this backward-compatibility hack in Automake 1.14. if ($old_default_source ne $default_source !$ext_var (rule $old_default_source @@ -3014,6 +3015,8 @@ sub scan_texinfo_file ($) } my $infobase = basename ($filename); + # TODO: In Automake 1.14 (or even 1.13.2), start warning against + # TODO: suffixes =! .texi, to ease transition to Automake-NG. $infobase =~ s/\.te?xi(nfo)?$//; return ($outfile, $vfile); } @@ -4134,6 +4137,9 @@ sub handle_configure ($$$@) # Distribute and define mkinstalldirs only if it is already present # in the package, for backward compatibility (some people may still # use $(mkinstalldirs)). + # TODO: start warning abut this in Automake 1.13.2, and have + # TODO: Automake 1.14 or 1.15 drop it (and the mkinstalldirs script + # TODO: as well). my $mkidpath = $config_aux_dir/mkinstalldirs; if (-f $mkidpath) { diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm index 186d4ca..9e06599 100644 --- a/lib/Automake/Options.pm +++ b/lib/Automake/Options.pm @@ -315,16 +315,19 @@ sub _process_option_list (\%@) { set_strictness ($_); } + # TODO: Remove this special check in Automake 1.14 or 1.15. elsif (/^(.*\/)?ansi2knr$/) { # Obsolete (and now removed) de-ANSI-fication support. error ($where, automatic de-ANSI-fication support has been removed); } + # TODO: Remove this special check in Automake 1.15. elsif ($_ eq 'cygnus') { error $where, support for Cygnus-style trees has been removed; } + # TODO: Remove this special check in Automake 1.14 or 1.15. elsif ($_ eq 'dist-lzma') { error ($where, support for lzma-compressed distribution . diff --git a/m4/obsolete-err.m4 b/m4/obsolete-err.m4 index eb23dc4..01c2d6e 100644 --- a/m4/obsolete-err.m4 +++ b/m4/obsolete-err.m4 @@ -8,16 +8,19 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +dnl TODO: Remove in Automake 1.15. AC_DEFUN([AM_CONFIG_HEADER], [AC_FATAL(['$0': this macro is obsolete. You should use the 'AC][_CONFIG_HEADERS' macro instead.])]) +dnl TODO: Remove in Automake 1.15. AC_DEFUN([AM_PROG_CC_STDC], [AC_FATAL(['$0': this macro is obsolete. You should simply use the 'AC][_PROG_CC' macro instead. Also, your code should no longer depend upon 'am_cv_prog_cc_stdc', but upon 'ac_cv_prog_cc_stdc'.])]) +dnl TODO: Remove in Automake 1.14. AC_DEFUN([AM_C_PROTOTYPES], [AC_FATAL([automatic de-ANSI-fication support has been removed])]) AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) -- 1.8.1.rc3.27.g3b73c7d
[PATCH 0/3] Texinfo: allow '.info' placed in $(builddir), remove cruft
See the commit messages of the individual patches for rationales and background. I plan to push this series to master in 72 hours. Stefano Lattarini (3): texinfo: info files can be generated in the builddir texinfo: remove hack about info files in CLEANFILES variables docs: document the new 'info-in-builddir' option NEWS | 26 +++ automake.in | 30 ++-- doc/automake.texi | 11 +++ lib/Automake/Options.pm | 1 + t/list-of-tests.mk| 5 +- t/mdate5.sh | 51 -- t/{txinfo25.sh = txinfo-builddir.sh} | 126 +++--- t/txinfo23.sh | 66 -- t/txinfo24.sh | 83 -- t/txinfo28.sh | 89 t/txinfo33.sh | 1 - 11 files changed, 146 insertions(+), 343 deletions(-) rename t/{txinfo25.sh = txinfo-builddir.sh} (50%) delete mode 100755 t/txinfo23.sh delete mode 100755 t/txinfo24.sh delete mode 100755 t/txinfo28.sh -- 1.8.1.rc3.27.g3b73c7d
Re: [PATCHES] Better error messages if obsolete macros are used
Il 31/12/2012 10:05, Stefano Lattarini ha scritto: On 12/30/2012 07:08 PM, Paolo Bonzini wrote: Il 30/12/2012 11:23, Stefano Lattarini ha scritto: +AC_DEFUN([AM_CONFIG_HEADER], +[AC_FATAL(['$0': this macro is obsolete. +You should use the 'AC][_CONFIG_HEADERS' macro instead.])]) + What's the point in doing this instead of m4_defun([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS]) or something like that? Issuing a fatal error will force users to upgrade to AC_CONFIG_HEADERS, thus allowing us to remove AM_CONFIG_HEADER altogether in future Automake versions (probably 1.15). 4, or maybe 1.15). Again: it does not do any harm. Move it to m4/obsolete.m4, and nobody will ever care about it again (including deleting it). Paolo
Re: [PATCHES] Better error messages if obsolete macros are used
On 12/31/2012 11:04 AM, Paolo Bonzini wrote: Il 31/12/2012 10:05, Stefano Lattarini ha scritto: On 12/30/2012 07:08 PM, Paolo Bonzini wrote: Il 30/12/2012 11:23, Stefano Lattarini ha scritto: +AC_DEFUN([AM_CONFIG_HEADER], +[AC_FATAL(['$0': this macro is obsolete. +You should use the 'AC][_CONFIG_HEADERS' macro instead.])]) + What's the point in doing this instead of m4_defun([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS]) or something like that? Issuing a fatal error will force users to upgrade to AC_CONFIG_HEADERS, thus allowing us to remove AM_CONFIG_HEADER altogether in future Automake versions (probably 1.15). 4, or maybe 1.15). Again: it does not do any harm. Move it to m4/obsolete.m4, and nobody will ever care about it again (including deleting it). It is indeed possible that the real reason that pushed me to remove AM_CONFIG_HEADER was the fact that I got caught in a cleanup frenzy when I was removing other (real) cruft. You are starting to partly convince me of that. That said, I still believe that old cruft, even if completely harmless as in this case, should be removed eventually (and that macro has been cruft for almost 10 yars now). The real issue with the removal is that it is has been too abrupt, with no transition from doc deprecation to runtime warnings to error message to complete removal (despite the fact we had all the time to implement this transition, and not doing so has been 100% my fault). These patches tries to remedy this situation. Regards, Stefano
Re: [PATCHES] Better error messages if obsolete macros are used
Il 31/12/2012 11:32, Stefano Lattarini ha scritto: It is indeed possible that the real reason that pushed me to remove AM_CONFIG_HEADER was the fact that I got caught in a cleanup frenzy when I was removing other (real) cruft. You are starting to partly convince me of that. These patches are at least a little better, so I'll just let your subconscious finish the task of convincing you. (Also because almost nobody is using autoupdate anymore I believe, so a first step using AU_DEFUN would not provide much benefit). That said, I still believe that old cruft, even if completely harmless as in this case, should be removed eventually (and that macro has been cruft for almost 10 yars now). The real issue with the removal is that it is has been too abrupt, with no transition from doc deprecation to runtime warnings to error message to complete removal (despite the fact we had all the time to implement this transition, and not doing so has been 100% my fault). These patches tries to remedy this situation. Yeah, I agree entirely here. Paolo
Re: [PATCHES] Better error messages if obsolete macros are used
On 12/31/2012 02:17 PM, Paolo Bonzini wrote: Il 31/12/2012 11:32, Stefano Lattarini ha scritto: It is indeed possible that the real reason that pushed me to remove AM_CONFIG_HEADER was the fact that I got caught in a cleanup frenzy when I was removing other (real) cruft. You are starting to partly convince me of that. These patches are at least a little better, so I'll just let your subconscious finish the task of convincing you. (Also because almost nobody is using autoupdate anymore I believe, so a first step using AU_DEFUN would not provide much benefit). But adding a non-fatal warning in the 'obsolete' category (which is active by default since Automake 1.12.4) would have probably helped. It seems that has been the case for deprecation of things like $(INCLUDES) and AM_PROG_MKDIR_P (both deprecated with runtime warnings since at least 1.12.x, and to be removed only in 1.14); and I think and hope it will also help with the planned decommission of ACLOCAL_AMFLAGS (documented as deprecated in 1.13, and which will start raising non-fatal runtime warnings in Automake 1.14). That said, I still believe that old cruft, even if completely harmless as in this case, should be removed eventually (and that macro has been cruft for almost 10 yars now). The real issue with the removal is that it is has been too abrupt, with no transition from doc deprecation to runtime warnings to error message to complete removal (despite the fact we had all the time to implement this transition, and not doing so has been 100% my fault). These patches tries to remedy this situation. Yeah, I agree entirely here. Paolo Thanks, Stefano
[FYI] Merge branch 'maint' into master
commit 11fac8b2865ce3ed67c178a78bd37c8de709f9f7 Merge: de1ce8f 924ef26 Author: Stefano Lattarini stefano.lattar...@gmail.com Date: Mon Dec 31 13:45:05 2012 +0100 Merge branch 'maint' * maint: tests: enhance and tweak some texinfo tests tests: remove a redundant texinfo test tests: don't list a removed tests in XFAIL_TESTS tests: more explicative names for some tests cleanup: drop a redundant %?FIRST% transform maint: state when compatibility cruft should be removed or warned about Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com
[FYI] Merge branch 'maint' into master (again)
commit 51defae0a5af847d6c69de685b8997ae9178584d Merge: 11fac8b d7bc522 Author: Stefano Lattarini stefano.lattar...@gmail.com Date: Mon Dec 31 14:38:23 2012 +0100 Merge branch 'maint' * maint: docs: adjust comment w.r.t. recent tests renaming tests: some more renames for texinfo tests Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com
New year is coming ...
... so I have used the update-copyright target to update the copyright years of all the relevant files in the 'maint', 'master' and 'ng/master' branches. Regards, Stefano
Re: [PATCH 0/3] Texinfo: allow '.info' placed in $(builddir), remove cruft
On 12/31/2012 11:02 AM, Stefano Lattarini wrote: See the commit messages of the individual patches for rationales and background. I plan to push this series to master in 72 hours. Stefano Lattarini (3): texinfo: info files can be generated in the builddir docs: document the new 'info-in-builddir' option texinfo: remove hack about info files in CLEANFILES variables Actually, I think it might make sense to apply the first two patches to maint (after the 1.13.1 bug-fixing release is out). This should be OK, since the change itself is very unobtrusive and no possible source of bugs (Murphy spare me for having said so :-). In addition, having this new option earlier will allow a proper deprecation of the old CLEANFILES hack, so that its final removal in Automake 1.14 won't be too abrupt. Opinions, objections? Regards, Stefano
[FYI] {maint} tests: some enhancements to texinfo tests (from Automake-NG)
* t/txinfo-many-output-formats.sh: Backport improvements, almost verbatim, from Automake-NG commit 'v1.13-768-gb434acc' (plus minor tweaks for the sake of non-GNU make implementation). * t/txinfo-many-output-formats-vpath.sh: New test, backported almost verbatim from that same Automake-NG commit (again, with minor tweaks for the sake of non-GNU make implementations). * t/lsit-of-tests.mk: Adjust. Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com --- t/list-of-tests.mk| 1 + t/txinfo-many-output-formats-vpath.sh | 206 ++ t/txinfo-many-output-formats.sh | 44 +--- 3 files changed, 237 insertions(+), 14 deletions(-) create mode 100755 t/txinfo-many-output-formats-vpath.sh diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index c55ce4e..eef3de9 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -1165,6 +1165,7 @@ t/txinfo-dvi-recurs.sh \ t/txinfo-info-in-srcdir.sh \ t/txinfo-makeinfo-error-no-clobber.sh \ t/txinfo-many-output-formats.sh \ +t/txinfo-many-output-formats-vpath.sh \ t/txinfo-no-clutter.sh \ t/txinfo-no-extra-dist.sh \ t/txinfo-no-installinfo.sh \ diff --git a/t/txinfo-many-output-formats-vpath.sh b/t/txinfo-many-output-formats-vpath.sh new file mode 100755 index 000..74b04eb --- /dev/null +++ b/t/txinfo-many-output-formats-vpath.sh @@ -0,0 +1,206 @@ +#! /bin/sh +# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. + +# Test support for building HTML documentation, and the many +# install-DOC flavors, in VPATH builds. +# Keep in sync with sister test 'txinfo-many-output-formats.sh'. +# FIXME: in the long term, the best thing to do is probably to convert +# FIXME: this test and that sister test to TAP, and merge them. + +required='makeinfo tex texi2dvi' +. test-init.sh + +cat configure.ac \EOF +AC_CONFIG_FILES([rec/Makefile]) + +# At the time of writing, Autoconf does not supplies any of these +# definitions (and those below are purposely not those of the standard). +AC_SUBST([dvidir], ['${datadir}/${PACKAGE}/dvi']) +AC_SUBST([htmldir], ['${datadir}/${PACKAGE}/html']) +AC_SUBST([pdfdir], ['${datadir}/${PACKAGE}/pdf']) +AC_SUBST([psdir], ['${datadir}/${PACKAGE}/ps']) + +AC_OUTPUT +EOF + +cat Makefile.am 'END' +SUBDIRS = rec +info_TEXINFOS = main.texi sub/main2.texi +END + +cat main.texi 'END' +\input texinfo +@setfilename main.info +@settitle main +@node Top +Hello walls. +@bye +END + +mkdir sub +cat sub/main2.texi 'END' +\input texinfo +@setfilename main2.info +@settitle main2 +@node Top +Hello walls. +@bye +END + +mkdir rec +cat rec/main3.texi 'END' +\input texinfo +@setfilename main3.info +@settitle main3 +@node Top +Hello walls. +@bye +END + +cat rec/Makefile.am 'END' +info_TEXINFOS = main3.texi + +install-pdf-local: + @$(MKDIR_P) $(pdfdir) + : $(pdfdir)/hello +uninstall-local: + rm -f $(pdfdir)/hello + +check-local: ps pdf dvi html # For make distcheck. +END + +$ACLOCAL +$AUTOMAKE --add-missing +$AUTOCONF + +# To simplify syncing with sister test 'txinfo-many-output-formats.sh' +srcdir=.. + +if test $srcdir = ..; then + mkdir build + cd build +fi + +$srcdir/configure --prefix=$(pwd) + +$MAKE + +$sleep +# Test production of split-per-node HTML. +$MAKE html +test -d main.html +test -d sub/main2.html +test -d rec/main3.html + +# Rebuilding main.html should cause its timestamp to be updated. +is_newest main.html $srcdir/main.texi +$sleep +touch $srcdir/main.texi +$MAKE html +is_newest main.html $srcdir/main.texi + +$MAKE clean +test ! -e main.html +test ! -e sub/main2.html +test ! -e rec/main3.html + +# Test production of a single HTML file. +MAKEINFOFLAGS=--no-split $MAKE -e html +test -f main.html +test -f sub/main2.html +test -f rec/main3.html +$MAKE clean +test ! -e main.html +test ! -e sub/main2.html +test ! -e rec/main3.html + +# Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO. + +cp $srcdir/Makefile.am $srcdir/Makefile.sav +cat $srcdir/Makefile.am 'EOF' +AM_MAKEINFOHTMLFLAGS = --no-headers --no-split +AM_MAKEINFOFLAGS = --unsupported-option +EOF +(cd $srcdir $AUTOMAKE) +./config.status Makefile + +$MAKE html +test -f main.html +test -f sub/main2.html +test -d rec/main3.html +$MAKE clean +test ! -e main.html +test ! -e sub/main2.html +test ! -e rec/main3.html + +$MAKE install-html +test -f
[FYI] {mint} tests: fix reference to sister tests in two heading comments
* t/color-tests.sh: Here. * t/color-tests2.sh: And here. Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com --- t/color-tests.sh | 2 +- t/color-tests2.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/color-tests.sh b/t/color-tests.sh index 4e136c4..ae6ef68 100755 --- a/t/color-tests.sh +++ b/t/color-tests.sh @@ -15,7 +15,7 @@ # along with this program. If not, see http://www.gnu.org/licenses/. # Test Automake TESTS color output, by forcing it. -# Keep this in sync with the sister test 'color2.sh'. +# Keep this in sync with the sister test 'color-tests2.sh'. required='grep-nonprint' # For gen-testsuite-part: == try-with-serial-tests == diff --git a/t/color-tests2.sh b/t/color-tests2.sh index 34593a2..09ebff9 100755 --- a/t/color-tests2.sh +++ b/t/color-tests2.sh @@ -15,7 +15,7 @@ # along with this program. If not, see http://www.gnu.org/licenses/. # Test Automake TESTS color output, using the expect(1) program. -# Keep this in sync with the sister test 'color.sh'. +# Keep this in sync with the sister test 'color-tests.sh'. required='grep-nonprint' # For gen-testsuite-part: == try-with-serial-tests == -- 1.8.1.rc3.27.g3b73c7d
[FYI] {maint} tests: fix reference to related tests in some comments
* t/acloca10.sh: Here. * t/check2.sh: And here. * t/remake-deleted-m4-file.sh: And here. Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com --- t/acloca10.sh | 4 ++-- t/check2.sh | 2 +- t/remake-deleted-m4-file.sh | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/t/acloca10.sh b/t/acloca10.sh index f10abcd..632e816 100755 --- a/t/acloca10.sh +++ b/t/acloca10.sh @@ -15,8 +15,8 @@ # along with this program. If not, see http://www.gnu.org/licenses/. # Make sure aclocal define macros in the same order as -I's. -# This is the same as aclocal9.sh, with the macro calls reversed. -# (It did make a difference.) +# This is the same as aclocal-I-order-1.sh, with the macro calls +# reversed (it did make a difference). # # Also check for --install. diff --git a/t/check2.sh b/t/check2.sh index f496acd..03fa8b9 100755 --- a/t/check2.sh +++ b/t/check2.sh @@ -57,7 +57,7 @@ grep '^PASS: subrun\.sh *$' stdout grep 'PASS.*echo\.sh' stdout exit 1 # 'check' should depend directly on 'check-am' (similar tests are -# in check.sh and check3.sh). +# in 'check.sh' and 'built-sources-check.sh'). $EGREP '^check:.* check-recursive( |$)' Makefile.in $EGREP '^check:.* check-am( |$)' dir/Makefile.in diff --git a/t/remake-deleted-m4-file.sh b/t/remake-deleted-m4-file.sh index eb84621..18c481c 100755 --- a/t/remake-deleted-m4-file.sh +++ b/t/remake-deleted-m4-file.sh @@ -17,8 +17,8 @@ # Test remake rules when an m4 file gets removed and the macros it # defined get inlined into the caller. Try with both an indirect # call and a direct one. This can be seen as testing the deleted -# header file issue w.r.t. aclocal.m4 dependencies. See also related -# test 'acloca22.sh'. +# header file issue w.r.t. aclocal.m4 dependencies. See also +# related test 'aclocal-deleted-header.sh'. . test-init.sh -- 1.8.1.rc3.27.g3b73c7d
[FYI] {maint} coverage: test CONFIG_STATUS_DEPENDENCIES
* t/remake-config-status-dependencies.sh: New test. * t/list-of-tests.mk: Add it. * doc/automake.texi: Reference it in comments. Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com --- doc/automake.texi | 1 + t/list-of-tests.mk | 1 + t/remake-config-status-dependencies.sh | 70 ++ 3 files changed, 72 insertions(+) create mode 100755 t/remake-config-status-dependencies.sh diff --git a/doc/automake.texi b/doc/automake.texi index b23805a..ee2df4d 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -9892,6 +9892,7 @@ from @file{configure.ac}. For instance, the following statement will cause @file{configure} to be rerun each time @file{version.sh} is changed. +@c Keep in sync with remake-config-status-dependencies.sh @example AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version.sh']) @end example diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index a73e551..d612573 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -919,6 +919,7 @@ t/remake-after-aclocal-m4.sh \ t/remake-include-configure.sh \ t/remake-include-makefile.sh \ t/remake-include-aclocal.sh \ +t/remake-config-status-dependencies.sh \ t/remake-deeply-nested.sh \ t/remake-mild-stress.sh \ t/remake-all-1.sh \ diff --git a/t/remake-config-status-dependencies.sh b/t/remake-config-status-dependencies.sh new file mode 100755 index 000..c625661 --- /dev/null +++ b/t/remake-config-status-dependencies.sh @@ -0,0 +1,70 @@ +#! /bin/sh +# Copyright (C) 2013 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. + +# Test CONFIG_STATUS_DEPENDENCIES. + +. test-init.sh + +cat configure.ac 'END' +. ${srcdir}/version.sh +AC_SUBST([EXTRA_VERSION]) +AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version.sh']) +AC_OUTPUT +END + +echo EXTRA_VERSION=1.0 version.sh + +cat Makefile.am 'END' +.PHONY: test-1 test-2 test-3 +check-local: test-3 +test-1: + test $(EXTRA_VERSION) = 1.0 +test-2: + test $(EXTRA_VERSION) = 2.1 +test-3: + test $(EXTRA_VERSION) = 3.14 +END + +$ACLOCAL +$AUTOCONF +$AUTOMAKE + +./configure +$MAKE test-1 + +$sleep +echo EXTRA_VERSION=2.1 version.sh +using_gmake || $MAKE Makefile +$MAKE test-2 + +$MAKE distclean +mkdir build +cd build +../configure +$MAKE test-2 +$sleep +echo EXTRA_VERSION=3.14 ../version.sh +using_gmake || $MAKE Makefile +$MAKE test-3 + +# Contents of $(CONFIG_STATUS_DEPENDENCIES) are *not* to be +# automatically distributed; there is no generic good reason +# for that. +$MAKE distdir +test ! -e $distdir/version.sh +test -f $distdir/configure || exit 99 # Sanity check. + +: -- 1.8.1.rc3.27.g3b73c7d
[FYI] {maint} coverage: test CONFIGURE_DEPENDENCIES
* t/remake-configure-dependencies.sh: New test. * t/list-of-tests.mk: Add it. * doc/automake.texi: Reference it in comments. Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com --- doc/automake.texi | 1 + t/list-of-tests.mk | 1 + t/remake-configure-dependencies.sh | 80 ++ 3 files changed, 82 insertions(+) create mode 100755 t/remake-configure-dependencies.sh diff --git a/doc/automake.texi b/doc/automake.texi index ee2df4d..47a8e3a 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -9905,6 +9905,7 @@ any level in the build hierarchy. Beware not to mistake @code{CONFIGURE_DEPENDENCIES} for @code{CONFIG_STATUS_DEPENDENCIES}. +@c Keep in sync with remake-configure-dependencies.sh @code{CONFIGURE_DEPENDENCIES} adds dependencies to the @file{configure} rule, whose effect is to run @command{autoconf}. This variable should be seldom used, because @command{automake} already tracks diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index d612573..591b4f0 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -920,6 +920,7 @@ t/remake-include-configure.sh \ t/remake-include-makefile.sh \ t/remake-include-aclocal.sh \ t/remake-config-status-dependencies.sh \ +t/remake-configure-dependencies.sh \ t/remake-deeply-nested.sh \ t/remake-mild-stress.sh \ t/remake-all-1.sh \ diff --git a/t/remake-configure-dependencies.sh b/t/remake-configure-dependencies.sh new file mode 100755 index 000..2e5df88 --- /dev/null +++ b/t/remake-configure-dependencies.sh @@ -0,0 +1,80 @@ +#! /bin/sh +# Copyright (C) 2013 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. + +# Test CONFIGURE_DEPENDENCIES. + +. test-init.sh + +cat configure.ac 'END' +AC_INIT([confdeps], m4_esyscmd([./print-version])) +AM_INIT_AUTOMAKE([foreign]) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +END + +# Needless to say, the autom4te cache happily break this test. +cat .autom4te.cfg 'END' +begin-language: Autoconf-without-aclocal-m4 +args: --no-cache +end-language: Autoconf-without-aclocal-m4 +END + +cat Makefile.am 'END' +EXTRA_DIST = .autom4te.cfg +CONFIGURE_DEPENDENCIES = $(top_srcdir)/print-version + +test-1: + test $(VERSION) = 1.0 +test-2: + test $(VERSION) = 2.1 +test-3: + test $(VERSION) = 3.14 + +.PHONY: test-1 test-2 test-3 + +# Contents of $(CONFIGURE_DEPENDENCIES) are to be automatically +# distributed. +local-check: test-3 distdir + test -f $(distdir)/print-version +END + +(echo '#!/bin/sh' echo 'printf %s 1.0') print-version +chmod a+x print-version + +$ACLOCAL +$AUTOCONF +$AUTOMAKE + +./configure +$MAKE test-1 + +(echo '#!/bin/sh' echo 'printf %s 2.1') print-version +using_gmake || $MAKE Makefile +$MAKE test-2 + +$MAKE distclean +mkdir build +cd build +../configure +$MAKE test-2 +(echo '#!/bin/sh' echo 'printf %s 3.14') ../print-version +using_gmake || $MAKE Makefile +$MAKE test-3 + +# Check that $(CONFIGURE_DEPENDENCIES) are automatically distributed. +$MAKE distcheck + +: -- 1.8.1.rc3.27.g3b73c7d
[FYI] {maint} docs: autom4te cache can break CONFIGURE_DEPENDENCIES
In fact, the new test 'remake-configure-dependencies.sh' only works because it disables the autom4te cache :-( That is more of an AUtotools design issue than an Automake bug, so better just document it ... * doc/automake.texi (Rebuilding): ... here. Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com --- doc/automake.texi | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/automake.texi b/doc/automake.texi index 47a8e3a..b4dad5c 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -9911,7 +9911,11 @@ Beware not to mistake @code{CONFIGURE_DEPENDENCIES} for variable should be seldom used, because @command{automake} already tracks @code{m4_include}d files. However it can be useful when playing tricky games with @code{m4_esyscmd} or similar non-recommendable -macros with side effects. +macros with side effects. Be also aware that interactions of this +variable with the @ref{Autom4te Cache, , autom4te cache, autoconf, +The Autoconf Manual} are quite problematic and can cause subtle +breakage, so you might want to disable the cache if you want to use +@code{CONFIGURE_DEPENDENCIES}. @code{CONFIG_STATUS_DEPENDENCIES} adds dependencies to the @file{config.status} rule, whose effect is to run @file{configure}. -- 1.8.1.rc3.27.g3b73c7d
Re: bug#13317: automake fails make check
On 12/31/2012 09:21 AM, Ronald Copley wrote: Log attached Thanks. I haven't looked at it in detail yet, but a cursory look has already helped me to find and fix some latent testsuite issues (patches for them are attached). I hope I'll be able to look in more depth at your report in the next days. Best regards, and happy new year, Stefano From f2443786a7dec55f498c06b8b207751aa06368cf Mon Sep 17 00:00:00 2001 Message-Id: f2443786a7dec55f498c06b8b207751aa06368cf.1357000944.git.stefano.lattar...@gmail.com From: Stefano Lattarini stefano.lattar...@gmail.com Date: Tue, 1 Jan 2013 00:51:37 +0100 Subject: [PATCH 1/2] tests: fix bug in pkg-config-macros.sh, could cause spurious SKIPs Issue spotted perusing the testsuite logs reported in bug#13317. * t/pkg-config-macros.sh: Don't use (uninitialized) '$dir' where '$d' should have been used instead. Set IFS to ':' before looping on the $PATH expansion. Fix typo: 'alocal' instead of 'aclocal'. These issues were causing the location in PATH of the 'pkg-config' program not to be found even when the program was present. * THANKS: Update. Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com --- THANKS | 1 + t/pkg-config-macros.sh | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/THANKS b/THANKS index 1ff7c08..5fa307d 100644 --- a/THANKS +++ b/THANKS @@ -337,6 +337,7 @@ Robert Collins robert.coll...@itdomain.com.au Robert Swafford robert.swaff...@l-3com.com Roberto Bagnara bagn...@cs.unipr.it Roman Fietzeroman.fie...@telemotive.de +Ronald Copley ronald.cop...@gmail.com Ronald Landheer ron...@landheer.com Roumen Petrov bugtr...@roumenpetrov.info Russ Allberyr...@stanford.edu diff --git a/t/pkg-config-macros.sh b/t/pkg-config-macros.sh index ec8b381..5069c08 100755 --- a/t/pkg-config-macros.sh +++ b/t/pkg-config-macros.sh @@ -48,9 +48,10 @@ XT_ACLOCAL_PATH=/usr/local/share/aclocal:/usr/share/aclocal # Find the location of the pkg-config executable. oIFS=$IFS dir= +IFS=: for d in $PATH; do IFS=$oIFS - if test -f $dir/pkg-config || test -f $dir/pkg-config.exe; then + if test -f $d/pkg-config || test -f $d/pkg-config.exe; then dir=$d break fi @@ -61,7 +62,7 @@ IFS=$oIFS # where the corresponding pkg.m4 might be installed. if test -n $dir; then # Only support standard installation layouts. - XT_ACLOCAL_PATH=${dir%/bin}/share/alocal:$XT_ACLOCAL_PATH + XT_ACLOCAL_PATH=${dir%/bin}/share/aclocal:$XT_ACLOCAL_PATH fi XT_ACLOCAL_PATH=$XT_ACLOCAL_PATH${ACLOCAL_PATH+:$ACLOCAL_PATH} -- 1.8.1.rc3.27.g3b73c7d From f87ce5b01869361bb9f1035ae9f45bbf5e76b8bc Mon Sep 17 00:00:00 2001 Message-Id: f87ce5b01869361bb9f1035ae9f45bbf5e76b8bc.1357000944.git.stefano.lattar...@gmail.com In-Reply-To: f2443786a7dec55f498c06b8b207751aa06368cf.1357000944.git.stefano.lattar...@gmail.com References: f2443786a7dec55f498c06b8b207751aa06368cf.1357000944.git.stefano.lattar...@gmail.com From: Stefano Lattarini stefano.lattar...@gmail.com Date: Tue, 1 Jan 2013 01:20:49 +0100 Subject: [PATCH 2/2] tests: don't always look for a C++ compiler named 'RCC' On MacOS X (10.8), since the file system is case-insensitive, RCC can point to the Resource Compiler of the Qt4 Toolkit: http://doc.qt.digia.com/4.2/rcc.html That mismatch causes our configure script to erroneously think that no working C++ compiler is present, and that is thus necessary to skip all the test cases requiring such a compiler. So only look for a compiler named 'RCC' if the file system is case-sensible. Issue spotted analyzing the testsuite logs reported in bug#13317. * configure.ac: Adjust. Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com --- configure.ac | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index a62743f..6822639 100644 --- a/configure.ac +++ b/configure.ac @@ -470,12 +470,14 @@ AS_IF([test x$GCC = xyes], [am_CC_is_GNU=yes], [am_CC_is_GNU=no]) # On case-insensitive file systems (seen e.g. on Cygwin and Mac OS X) # we must avoid looking for 'CC', because that would be the same as # 'cc', and could cause $CXX to point to the C compiler, instead of -# to a C++ compiler as expected. See automake bugs #11893 and #10766. +# to a C++ compiler as expected (see automake bugs #11893 and #10766). +# Similarly, we must avoid looking for 'RCC', as that can point to the +# Qt4 Resource Compiler: http://doc.qt.digia.com/4.2/rcc.html if test -f /bIn/rMdIr || test -f /uSr/bIn/rMdIr; then # Case-insensitive file system, don't look for CC. - am_CC= + am_CC= am_RCC= else - am_CC=CC + am_CC=CC am_RCC=RCC fi # The list of C++ compilers here has been copied, pasted and edited @@ -483,7 +485,7 @@ fi # Keep it in sync, or better again, find out a way to avoid this code # duplication. _AM_COMPILER_CAN_FAIL([AC_PROG_CXX(dnl -
[FYI] Merge branch 'maint' into master
commit e4a5f2bfc83ffee919c2c46311573f8cfa04c825 Merge: 2d5ad97 f87ce5b Author: Stefano Lattarini stefano.lattar...@gmail.com Date: Tue Jan 1 01:33:12 2013 +0100 Merge branch 'maint' * maint: tests: don't always look for a C++ compiler named 'RCC' tests: fix bug in pkg-config-macros.sh, could cause spurious SKIPs docs: autom4te cache can break CONFIGURE_DEPENDENCIES coverage: test CONFIGURE_DEPENDENCIES coverage: test CONFIG_STATUS_DEPENDENCIES