From: Stefano Lattarini Date: Wed, 22 Feb 2012 09:56:17 +0000 (+0100) Subject: Merge branch 'master' into ng/master X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2dc4accd4b6ad4ef7f517d752652ec71cca7f6ad;p=thirdparty%2Fautomake.git Merge branch 'master' into ng/master * master: tests: prefer 'configure.ac' over 'configure.in' coverage: expose automake bug#7868 tests: remove obsoleted "icc" requirement readme: fix typo in tests/README --- 2dc4accd4b6ad4ef7f517d752652ec71cca7f6ad diff --cc syntax-checks.mk index 0b730d451,254c3ab6b..d6ab29110 --- a/syntax-checks.mk +++ b/syntax-checks.mk @@@ -77,8 -68,10 +77,9 @@@ sc_tests_automake_fails sc_tests_plain_aclocal \ sc_tests_plain_perl \ sc_tests_required_after_defs \ -sc_tests_overriding_macros_on_cmdline \ sc_tests_plain_sleep \ sc_tests_plain_egrep_fgrep \ + sc_tests_no_configure_in \ sc_tests_PATH_SEPARATOR \ sc_tests_logs_duplicate_prefixes \ sc_tests_makefile_variable_order \ diff --cc tests/Makefile.am index da7a68d66,8a77681fc..6ef271aaf --- a/tests/Makefile.am +++ b/tests/Makefile.am @@@ -42,7 -41,9 +42,8 @@@ interp3.test override-conditional-2.test \ java-nobase.test \ objext-pr10128.test \ + parallel-tests-many.test \ pr8365-remake-timing.test \ -lex-subobj-nodep.test \ remake-am-pr10111.test \ remake-m4-pr10111.test \ txinfo5.test \ diff --cc tests/README index 08d06cfdf,9d0b4f23f..70d5873cc --- a/tests/README +++ b/tests/README @@@ -237,15 -238,15 +237,15 @@@ D Use `$PATH_SEPARATOR', not hard-coded `:', as the separator of PATH's entries. - It's more important to make sure that a feature works, than - make sure that Automake's output looks correct. It might look - correct and still fail to work. In other words, prefer - running `make' over grepping `Makefile.in' (or do both). + It's more important to make sure that a feature works, than make sure + that the output of Automake-NG looks correct. It might look correct + and still fail to work. In other words, prefer running `make' over + grepping `Makefile.in' (or do both). If you run $AUTOMAKE or $AUTOCONF several times in the same test - and change `configure.in' by the meantime, do + and change `configure.ac' by the meantime, do rm -rf autom4te.cache - before the following runs. On fast machines the new `configure.in' + before the following runs. On fast machines the new `configure.ac' could otherwise have the same timestamp as the old `autom4te.cache'. Alternatively, use `--force' for subsequent runs of the tools. diff --cc tests/conffile-leading-dot.test index d9d299f8b,9c4cb4fff..3c5ba9753 --- a/tests/conffile-leading-dot.test +++ b/tests/conffile-leading-dot.test @@@ -18,9 -18,10 +18,9 @@@ # with a dot (like "./Makefile"), since the remake rules might be subtly # broken in that case. -required=GNUmake . ./defs || Exit 1 - cat > configure.in << END + cat > configure.ac << END AC_INIT([$me], [1.0]) AM_INIT_AUTOMAKE AC_CONFIG_FILES([./Makefile]) diff --cc tests/dollar.test index 5d0018099,2747e5d8c..baa89f512 --- a/tests/dollar.test +++ b/tests/dollar.test @@@ -20,9 -20,10 +20,9 @@@ # Require GNU make for this test. SunOS Make does not support # `$$' in a target or a dependency (it outputs the empty string instead). -required=GNUmake . ./defs || Exit 1 - echo AC_OUTPUT >> configure.in + echo AC_OUTPUT >> configure.ac cat > Makefile.am <<'EOF' mydir = $(prefix)/my diff --cc tests/extra10.test index 53a08300e,8fe7133d2..27eb1ed7c --- a/tests/extra10.test +++ b/tests/extra10.test @@@ -19,9 -19,10 +19,9 @@@ # See also sister test 'extra11.test', that check a similar usage # with the involvement of the $(wildcard) GNU make builtin. -required=GNUmake . ./defs || Exit 1 - echo AC_OUTPUT >> configure.in + echo AC_OUTPUT >> configure.ac cat > Makefile.am <<'END' EXTRA_DIST = *.foo diff --cc tests/extra11.test index baeac86ca,a645afbe4..b86be7304 --- a/tests/extra11.test +++ b/tests/extra11.test @@@ -17,9 -17,10 +17,9 @@@ # Check for more complex usage of wildcards in EXTRA_DIST. # Suggested by observations from Braden McDaniel. -required=GNUmake . ./defs || Exit 1 - echo AC_OUTPUT >> configure.in + echo AC_OUTPUT >> configure.ac cat > Makefile.am <<'END' AUTOMAKE_OPTIONS = -Wno-portability diff --cc tests/extra12.test index bdefab489,979411592..d499cedb2 --- a/tests/extra12.test +++ b/tests/extra12.test @@@ -18,9 -18,10 +18,9 @@@ # $srcdir != $builddir, if properly declared. # Suggested by observations from Braden McDaniel. -required=GNUmake . ./defs || Exit 1 - echo AC_OUTPUT >> configure.in + echo AC_OUTPUT >> configure.ac cat > Makefile.am <<'END' diff --cc tests/gnumake.test index 8ad386bf6,b1ea0002f..dd2fe378f --- a/tests/gnumake.test +++ b/tests/gnumake.test @@@ -17,9 -17,10 +17,9 @@@ # Automake should not assume that make files are called Makefile. # Report from Braden McDaniel. -required=GNUmake . ./defs || Exit 1 - cat >> configure.in << 'END' + cat >> configure.ac << 'END' AC_CONFIG_FILES([sub/GNUmakefile]) AC_OUTPUT END diff --cc tests/javaflags.test index db3c787f5,000ce463f..f42e3c27f --- a/tests/javaflags.test +++ b/tests/javaflags.test @@@ -24,7 -24,11 +24,7 @@@ echo "$*" > javaflags.lis END chmod a+x fake-javac - cat >> configure.in <<'END' -# Remove JAVAC from the environment, so that it won't interfere -# with `make -e' below. -unset JAVAC || : - + cat >> configure.ac <<'END' AC_PROG_CC # Simulate presence of the java compiler using our fake-javac script. AC_SUBST([JAVAC], ['$(abs_top_srcdir)'/fake-javac]) diff --cc tests/lflags.test index b8b83ca65,a29e147b9..98e03fc14 --- a/tests/lflags.test +++ b/tests/lflags.test @@@ -29,7 -29,11 +29,7 @@@ echo 'extern int dummy;' >> lex.yy. END chmod a+x fake-lex - cat >> configure.in <<'END' -# Remove Lex from the environment, so that it won't interfere -# with `make -e' below. -unset LEX || : - + cat >> configure.ac <<'END' AC_SUBST([CC], [false]) # Simulate presence of Lex using our fake-lex script. AC_SUBST([LEX], ['$(abs_top_srcdir)'/fake-lex]) diff --cc tests/lflags2.test index cdf9683f8,a5afd21a4..c5b65adbb --- a/tests/lflags2.test +++ b/tests/lflags2.test @@@ -28,7 -28,11 +28,7 @@@ echo 'extern int dummy;' >> lex.yy. END chmod a+x fake-lex - cat >> configure.in <<'END' -# Remove Lex from the environment, so that it won't interfere -# with `make -e' below. -unset LEX || : - + cat >> configure.ac <<'END' AC_SUBST([CXX], [false]) # Simulate presence of Lex using our fake-lex script. AC_SUBST([LEX], ['$(abs_top_srcdir)'/fake-lex]) diff --cc tests/make-dryrun.tap index a581bc430,37692059b..57c7a1c6c --- a/tests/make-dryrun.tap +++ b/tests/make-dryrun.tap @@@ -21,9 -21,15 +21,9 @@@ am_parallel_tests=yes # Avoid generatio plan_ 14 -if echo "all: ; @+printf %sbb%s aa cc" | $MAKE -n -f - | grep aabbcc; then - make_plus_silence () { return 0; } -else - make_plus_silence () { return 1; } -fi - mkdir sub - echo AC_OUTPUT >> configure.in + echo AC_OUTPUT >> configure.ac cat > Makefile.am <<'END' all: diff --cc tests/makej.test index 6c8211152,9144d83e2..a28253575 --- a/tests/makej.test +++ b/tests/makej.test @@@ -21,9 -21,10 +21,9 @@@ # depend on the time at which autoconf and automake update the cache # via autom4te. -required=GNUmake . ./defs || Exit 1 - cat >configure.in <configure.ac < mk.tmp << 'END' - targ.tmp: - : > $@ - .MAKE: targ.tmp -END - if $MAKE -n -f mk.tmp targ.tmp && test -f targ.tmp; then - have_dotmake=: - fi -fi - mkdir sub sub2 - cat >> configure.in << 'END' + cat >> configure.ac << 'END' AC_CONFIG_FILES([sub/Makefile sub2/Makefile]) AC_OUTPUT END diff --cc tests/parallel-tests-fork-bomb.test index 1f86c75c8,d992d63a1..2032d7bf9 --- a/tests/parallel-tests-fork-bomb.test +++ b/tests/parallel-tests-fork-bomb.test @@@ -31,18 -31,56 +31,18 @@@ TESTS errmsg = ::OOPS:: Recursion too deep -if IS_GNU_MAKE +is_too_deep := $(shell test $(MAKELEVEL) -lt 10 && echo no) - is_too_deep := $(shell test $(MAKELEVEL) -lt 10 && echo no) - -## Indenteation here required to avoid confusing Automake. +## Extra indentation here required to avoid confusing Automake. +## FIXME: now that we assume make is GNU make, this shouldn't happen! ifeq ($(is_too_deep),no) + # All is ok. else - $(error $(errmsg), $(MAKELEVEL) levels) + $(error $(errmsg), $(MAKELEVEL) levels) endif - -else !IS_GNU_MAKE - -# We use mkdir to detect the level of recursion, since it is easy -# to use and assured to be portably atomical. Also use an higher -# number than with GNU make above, since the level used here can -# be incremented by tow or more per recursion. -recursion-not-too-deep: - @ok=no; \ - for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 \ - 18 19 20 21 22 23 24 25 26 27 28 29; \ - do \ - echo " mkdir rec-$$i.d"; \ - if mkdir rec-$$i.d; then \ - ok=yes; break; \ - else :; fi; \ - done; \ - test $$ok = yes || { echo '$(errmsg)' >&2; exit 1; } -.PHONY: recursion-not-too-deep -clean-local: - rmdir rec-[0-9].d - -targets = all check recheck $(TESTS) $(TEST_LOGS) $(TEST_SUITE_LOG) -$(targets): recursion-not-too-deep - -# For BSD make. -.BEGIN: recursion-not-too-deep - -endif !IS_GNU_MAKE END - echo AC_OUTPUT >> configure.in -if using_gmake; then - cond=: -else - cond=false -fi - -cat >> configure.ac << END -AM_CONDITIONAL([IS_GNU_MAKE], [$cond]) -AC_OUTPUT -END ++echo AC_OUTPUT >> configure.ac # Another helpful idiom to avoid hanging on capable systems. The subshell # is needed since `ulimit' might be a special shell builtin. diff --cc tests/parallel-tests3.test index ffa900ec5,b550b7b6b..9ba27f286 --- a/tests/parallel-tests3.test +++ b/tests/parallel-tests3.test @@@ -24,7 -24,28 +24,7 @@@ case $MAKE i *\ -j*) skip_ "\$MAKE contains \`-j'";; esac - cat >> configure.in << 'END' -if using_gmake; then - j=-j -else - unindent > Makefile < \$@ -END - for j in "-j" "-j " NONE; do - if test x"$j" = xNONE; then - skip_ "can't run make in parallel mode" - fi - $MAKE ${j}2 all >output 2>&1 || continue - $EGREP -i "(warning|error):|-j[\"\'\` ]" output && continue - break - done - rm -f one output Makefile -fi - + cat >> configure.ac << 'END' AC_OUTPUT END diff --cc tests/parallel-tests5.test index 9500f4dcf,9f0a9669e..62256e0a5 --- a/tests/parallel-tests5.test +++ b/tests/parallel-tests5.test @@@ -21,10 -21,10 +21,10 @@@ # It merely serves as demonstration. :-) am_parallel_tests=yes -required='cc native GNUmake' +required='cc native' . ./defs || Exit 1 - cat >> configure.in << 'END' + cat >> configure.ac << 'END' AC_PROG_CC AC_OUTPUT END diff --cc tests/remake-deleted-m4-file.test index bcd17faca,177979e9e..258dde24b --- a/tests/remake-deleted-m4-file.test +++ b/tests/remake-deleted-m4-file.test @@@ -63,10 -64,11 +63,10 @@@ $MAKE tes $sleep - sed -e "s|FOO_MACRO|$macro_value|" configure.in > t - mv -f t configure.in + sed -e "s|FOO_MACRO|$macro_value|" configure.ac > t + mv -f t configure.ac rm -f m4/foo.m4 -using_gmake || $MAKE Makefile $MAKE test : diff --cc tests/remake-renamed-m4-macro-and-file.test index 2d93fc8ca,77e9d3eb5..6e99cdfee --- a/tests/remake-renamed-m4-macro-and-file.test +++ b/tests/remake-renamed-m4-macro-and-file.test @@@ -71,8 -72,9 +71,8 @@@ sed -e 's/BAR_MACRO/QUUX_MACRO/' sed -e 's/BAR_MACRO/QUUX_MACRO/' -e 's/MY_MACRO/A_MACRO/' \ m4/macros.m4 > m4/defs.m4 rm -f m4/macros.m4 m4/bar.m4 - sed -e 's/BAR_MACRO/QUUX_MACRO/' -e 's/MY_MACRO/A_MACRO/' configure.in > t - mv -f t configure.in + sed -e 's/BAR_MACRO/QUUX_MACRO/' -e 's/MY_MACRO/A_MACRO/' configure.ac > t + mv -f t configure.ac -using_gmake || $MAKE Makefile $MAKE test $MAKE distdir ls -l $distdir $distdir/* diff --cc tests/remake-subdir-long-time.test index 0d04b00a0,8f3174025..89dccaf29 --- a/tests/remake-subdir-long-time.test +++ b/tests/remake-subdir-long-time.test @@@ -93,14 -93,14 +93,14 @@@ rm -f automake-has-run aclocal-has-ru ./configure # Sanity check: Makefile doesn't get updated uselessly. -ACLOCAL=false AUTOMAKE=false AUTOCONF=false $MAKE -e +$MAKE ACLOCAL=false AUTOMAKE=false AUTOCONF=false $sleep - sed "s|magic|magic2|" configure.in > t - mv -f t configure.in + sed "s|magic|magic2|" configure.ac > t + mv -f t configure.ac cd sub -AUTOMAKE="$AUTOMAKE" ACLOCAL="$ACLOCAL" $MAKE -e Makefile +$MAKE Makefile AUTOMAKE="$AUTOMAKE" ACLOCAL="$ACLOCAL" cd .. # For debugging. diff --cc tests/remake-subdir.test index 44e61093c,3b3a8c1b0..f8290f63f --- a/tests/remake-subdir.test +++ b/tests/remake-subdir.test @@@ -51,10 -57,10 +51,10 @@@ $MAK debug_info $sleep - sed "s|magic|$magic1|" configure.in > t - mv -f t configure.in + sed "s|magic|$magic1|" configure.ac > t + mv -f t configure.ac cd sub -$remake +$MAKE cd .. debug_info $FGREP $magic1 configure diff --cc tests/remake10a.test index 3bff12d72,9cb835cf7..c7ac87a08 --- a/tests/remake10a.test +++ b/tests/remake10a.test @@@ -24,9 -24,13 +24,9 @@@ magic1=::MagicStringOne: magic2=__MagicStringTwo__ magic3=%%MagicStringThree%% -if using_gmake; then - remake="$MAKE nil" -else - remake="$MAKE Makefile" -fi +remake="$MAKE nil" - cat >> configure.in <> configure.ac <> configure.in <<'END' + cat >> configure.ac <<'END' AC_OUTPUT END diff --cc tests/remake10c.test index b9df6c5ee,51537c129..2eb88dbe6 --- a/tests/remake10c.test +++ b/tests/remake10c.test @@@ -24,9 -24,13 +24,9 @@@ magic1=::MagicStringOne: magic2=__MagicStringTwo__ magic3=%%MagicStringThree%% -if using_gmake; then - remake="$MAKE nil" -else - remake="$MAKE Makefile" -fi +remake="$MAKE nil" - cat >> configure.in <> configure.ac < configure.in < incl.mk -echo 'include incl.mk' > gnu-style.mk -echo '.include "incl.mk"' > bsd-style.mk -if $MAKE -f gnu-style.mk | grep 'include is supported'; then - echo "$me: GNU make include style supported" - include_zardoz='include zardoz' -elif $MAKE -f bsd-style.mk | grep 'include is supported'; then - echo "$me: BSD make include style supported" - include_zardoz='.include "zardoz"' -else - skip_ "make doesn't support any \"include\" directive" -fi - + cat > configure.ac <>configure.in <<'EOF' -if using_gmake; then - remake="$MAKE" -else - remake="$MAKE Makefile" -fi - + cat >>configure.ac <<'EOF' AM_MAINTAINER_MODE m4_include([foo.m4]) if test ! -f rebuild_ok; then @@@ -44,8 -50,8 +44,8 @@@ $MAK # triggered by default. ($MAKE will fail if they are, because the # tools are set to false.) $sleep - touch aclocal.m4 Makefile.am configure.in foo.m4 + touch aclocal.m4 Makefile.am configure.ac foo.m4 -$remake +$MAKE # Make sure the rebuild rule for Makefile is triggered. $sleep diff --cc tests/remake9a.test index 3b5d58aff,90a780a40..ff06848db --- a/tests/remake9a.test +++ b/tests/remake9a.test @@@ -22,7 -22,13 +22,7 @@@ magic1=::MagicStringOne:: magic2=__MagicStringTwo__ - cat >> configure.in <> configure.ac <t - mv -f t $srcdir/configure.in + sed "s/^\\(FINGERPRINT\\)=.*/\\1=$magic1/" $srcdir/configure.ac >t + mv -f t $srcdir/configure.ac - remake_ + $MAKE nil $FGREP FINGERPRINT Makefile # For debugging. $FGREP $magic1 Makefile test x"`./foo.sh`" = x"$magic1" @@@ -88,8 -94,9 +88,8 @@@ $sleep echo cat > $srcdir/tweak-configure-in # Make it a no-op again. - sed "s/^\\(FINGERPRINT\\)=.*/\\1=DummyValue/" $srcdir/configure.in >t - mv -f t $srcdir/configure.in + sed "s/^\\(FINGERPRINT\\)=.*/\\1=DummyValue/" $srcdir/configure.ac >t + mv -f t $srcdir/configure.ac - using_gmake || remake_ $MAKE distcheck $FGREP $magic1 Makefile && Exit 1 # Sanity check. $FGREP $magic2 Makefile && Exit 1 # Likewise. diff --cc tests/remake9c.test index 48117c5c8,77a327fac..19afa6183 --- a/tests/remake9c.test +++ b/tests/remake9c.test @@@ -22,7 -22,13 +22,7 @@@ magic1=::MagicStringOne:: magic2=__MagicStringTwo__ - cat >> configure.in <> configure.ac <> configure.in <> configure.ac <> configure.in << 'END' + cat >> configure.ac << 'END' # $(LINK) is not defined automatically by Automake, since the *_SOURCES # variables don't contain any known extension (.c, .cc, .f, ...). # So we need this hack -- but since such an hack can also serve as a diff --cc tests/vala-mix.test index 82d305a6e,acf47d989..2cd21464b --- a/tests/vala-mix.test +++ b/tests/vala-mix.test @@@ -16,10 -16,10 +16,10 @@@ # Vala sources and C sources in the same program. Functional test. -required='valac cc GNUmake' +required='valac cc' . ./defs || Exit 1 - cat >> configure.in <<'END' + cat >> configure.ac <<'END' AC_PROG_CC AM_PROG_CC_C_O AM_PROG_VALAC diff --cc tests/vala-vpath.test index c2a3ea8af,636e66ec6..cef335daa --- a/tests/vala-vpath.test +++ b/tests/vala-vpath.test @@@ -17,10 -17,10 +17,10 @@@ # Test to make sure vala support handles from-scratch VPATH builds. # See automake bug#8753. -required="valac GNUmake" +required=valac . ./defs || Exit 1 - cat >> configure.in << 'END' + cat >> configure.ac << 'END' AC_CONFIG_SRCDIR([hello.vala]) AC_PROG_CC AM_PROG_VALAC([0.7]) diff --cc tests/vars-assign.test index 9b91c26e6,fb4c14003..120118f83 --- a/tests/vars-assign.test +++ b/tests/vars-assign.test @@@ -19,30 -19,28 +19,30 @@@ . ./defs || Exit 1 - echo AC_OUTPUT >> configure.in -cat >>configure.ac << END -AC_PROG_CC -AC_OUTPUT -END ++echo AC_OUTPUT >> configure.ac -cat > Makefile.am << END -bin_PROGRAMS = foo -foo_SOURCES = foo.c foo.h -END +unset PREFOO FOO BAR BAZ XFOO XBAZ || : + +cat > Makefile.am <<'END' +PREFOO = bar +FOO := foo$(PREFOO)$(XFOO) +XFOO = fail +BAR ?= barbar -cat >foo.c << END -#include "foo.h" +.PHONY: test1 test2 +test1: + test $(FOO) = foobar + test $(BAR) = barbar +test2: + test $(FOO) = foobar + test $(BAR) = rabrab END -: >foo.h $ACLOCAL -$AUTOMAKE $AUTOCONF -./configure --disable-dependency-tracking 2>stderr || { - stat=$?; cat stderr >&2; Exit $stat; -} -cat stderr >&2 -grep shift stderr && Exit 1 +$AUTOMAKE +./configure +$MAKE test1 +PREFOO=notseen FOO=notseen BAR=rabrab $MAKE test2 : diff --cc tests/yacc-dist-nobuild-subdir.test index fb4f1d7cf,67568d797..05f76a9b9 --- a/tests/yacc-dist-nobuild-subdir.test +++ b/tests/yacc-dist-nobuild-subdir.test @@@ -21,7 -21,11 +21,7 @@@ required=yacc . ./defs || Exit 1 - cat >> configure.in << 'END' -# This test is bounded to fail for any implementation that -# triggers automake bug#7884. -useless_vpath_rebuild && skip_ "would trip on automake bug#7884" - + cat >> configure.ac << 'END' AC_PROG_CC AM_PROG_CC_C_O AC_PROG_YACC diff --cc tests/yflags.test index 4bed0c987,5101eedc9..969ded0b9 --- a/tests/yflags.test +++ b/tests/yflags.test @@@ -28,7 -28,11 +28,7 @@@ echo 'extern int dummy;' >> y.tab. END chmod a+x fake-yacc - cat >> configure.in <<'END' -# Remove Yacc from the environment, so that it won't interfere -# with `make -e' below. -unset YACC || : - + cat >> configure.ac <<'END' AC_SUBST([CC], [false]) # Simulate presence of Yacc using our fake-yacc script. AC_SUBST([YACC], ['$(abs_top_srcdir)'/fake-yacc]) diff --cc tests/yflags2.test index 0f76b4ccd,d9cf5ed15..092b5b8c2 --- a/tests/yflags2.test +++ b/tests/yflags2.test @@@ -28,7 -28,11 +28,7 @@@ echo 'extern int dummy;' >> y.tab. END chmod a+x fake-yacc - cat >> configure.in <<'END' -# Remove Yacc from the environment, so that it won't interfere -# with `make -e' below. -unset YACC || : - + cat >> configure.ac <<'END' AC_SUBST([CXX], [false]) # Simulate presence of Yacc using our fake-yacc script. AC_SUBST([YACC], ['$(abs_top_srcdir)'/fake-yacc])