diff options
author | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2011-03-21 22:18:42 +0100 |
---|---|---|
committer | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2011-03-21 22:20:43 +0100 |
commit | fac422c8914f14acae106338ddd6efc0297c49e9 (patch) | |
tree | 17d8385fd0f798ada9408b40dd7b474a8beb440e | |
parent | 5d2a076684b303de8f7ad14506e23d251ce3e5d0 (diff) | |
parent | 34c1c2d884774ae91f82e1c5027d1502b3112c6a (diff) | |
download | automake-fac422c8914f14acae106338ddd6efc0297c49e9.tar.gz |
Merge branch 'maint'
-rw-r--r-- | ChangeLog | 32 | ||||
-rw-r--r-- | Makefile.am | 61 | ||||
-rw-r--r-- | Makefile.in | 58 | ||||
-rw-r--r-- | tests/Makefile.am | 6 | ||||
-rw-r--r-- | tests/Makefile.in | 6 | ||||
-rw-r--r-- | tests/defs | 2 | ||||
-rwxr-xr-x | tests/dist-included-parent-dir.test (renamed from tests/include2.test) | 0 | ||||
-rwxr-xr-x | tests/hdr-vars-defined-once.test (renamed from tests/include.test) | 0 | ||||
-rwxr-xr-x | tests/m4-inclusion.test (renamed from tests/sinclude.test) | 10 |
9 files changed, 161 insertions, 14 deletions
@@ -1,3 +1,35 @@ +2011-03-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + tests: fix unindent to use printf not echo for script. + * tests/defs.in: Use printf rather than echo, as the latter may + interpret the backslashes in the sed script. Fixes test + failures with dash as /bin/sh. + +2011-03-17 Stefano Lattarini <stefano.lattarini@gmail.com> + Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + maintcheck: look for problematic names of testcases + The configure.in stub created by default by `tests/defs' obtains + the first argument of AC_INIT from the test name, and this can + cause some supported autoconf versions to fail with a spurious + error if that test name contains the name of an m4 or m4sugar + builtin or macro (e.g., `defn' or `m4_undefine'). + See for example the bug fixed by commit v1.11-287-g1325a8a. + This change add a maintainer check that warns about test names + which are possibly problematic in this regard. + * Makefile.am (sc_test_names): New maintainer-check target. + (syntax_check_rules): Add it. + (m4_builtins): New helper variable. + (TESTS): Updated according to the following renamings. + * tests/include.test: Renamed ... + * tests/hdr-vars-defined-once.test: ... to this. + * tests/sinclude.test: Renamed ... + * tests/m4-inclusion.test: ... to this, and simplified + accordingly. + * tests/include2.test: Renamed ... + * tests/dist-included-parent-dir.test: ... to this, for + consistency. + 2011-03-04 Stefano Lattarini <stefano.lattarini@gmail.com> tests: fix bug in alloca*.test diff --git a/Makefile.am b/Makefile.am index 0bdcfbe86..cf4e0d083 100644 --- a/Makefile.am +++ b/Makefile.am @@ -164,6 +164,7 @@ clean-local: clean-coverage # Some simple checks, and then ordinary check. These are only really # guaranteed to work on my machine. syntax_check_rules = \ +sc_test_names \ sc_diff_automake_in_automake \ sc_perl_syntax \ sc_no_brace_variable_expansions \ @@ -206,6 +207,66 @@ sc_at_in_texi $(syntax_check_rules): automake aclocal maintainer-check: $(syntax_check_rules) +## Look for test whose names can cause spurious failures when used as +## first argument to AC_INIT (chiefly because they might contain an +## m4/m4sugar builtin or macro name). +m4_builtins = \ + __gnu__ \ + __unix__ \ + bpatsubst \ + bregexp \ + builtin \ + changecom \ + changequote \ + changeword \ + debugfile \ + debugmode \ + decr \ + define \ + defn \ + divert \ + divnum \ + dnl \ + dumpdef \ + errprint \ + esyscmd \ + eval \ + format \ + ifdef \ + ifelse \ + include \ + incr \ + index \ + indir \ + len \ + m4exit \ + m4wrap \ + maketemp \ + mkstemp \ + patsubst \ + popdef \ + pushdef \ + regexp \ + shift \ + sinclude \ + substr \ + symbols \ + syscmd \ + sysval \ + traceoff \ + traceon \ + translit \ + undefine \ + undivert +sc_test_names: + @m4_builtin_rx=`echo $(m4_builtins) | sed 's/ /|/g'`; \ + m4_macro_rx="\\<($$m4_builtin_rx)\\>|\\<_?(A[CUMHS]|m4)_"; \ + if ls tests/*.test | LC_ALL=C grep -E "$$m4_macro_rx"; then \ + echo "the names of the tests above can be problematic" 1>&2; \ + echo "Avoid test names that contain names of m4 macros" 1>&2; \ + exit 1; \ + fi + ## This check avoids accidental configure substitutions in the source. ## There are exactly 8 lines that should be modified. This works out ## to 28 lines of diffs. diff --git a/Makefile.in b/Makefile.in index 15957ba96..e2f796fa3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -285,6 +285,7 @@ PERL_COVER = cover # Some simple checks, and then ordinary check. These are only really # guaranteed to work on my machine. syntax_check_rules = \ +sc_test_names \ sc_diff_automake_in_automake \ sc_perl_syntax \ sc_no_brace_variable_expansions \ @@ -323,6 +324,55 @@ sc_unquoted_DESTDIR \ sc_tabs_in_texi \ sc_at_in_texi +m4_builtins = \ + __gnu__ \ + __unix__ \ + bpatsubst \ + bregexp \ + builtin \ + changecom \ + changequote \ + changeword \ + debugfile \ + debugmode \ + decr \ + define \ + defn \ + divert \ + divnum \ + dnl \ + dumpdef \ + errprint \ + esyscmd \ + eval \ + format \ + ifdef \ + ifelse \ + include \ + incr \ + index \ + indir \ + len \ + m4exit \ + m4wrap \ + maketemp \ + mkstemp \ + patsubst \ + popdef \ + pushdef \ + regexp \ + shift \ + sinclude \ + substr \ + symbols \ + syscmd \ + sysval \ + traceoff \ + traceon \ + translit \ + undefine \ + undivert + WGET = wget WGET_SV_CVS = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/ WGET_SV_GIT_CF = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f=' @@ -975,6 +1025,14 @@ clean-local: clean-coverage .PHONY: $(syntax_check_rules) $(syntax_check_rules): automake aclocal maintainer-check: $(syntax_check_rules) +sc_test_names: + @m4_builtin_rx=`echo $(m4_builtins) | sed 's/ /|/g'`; \ + m4_macro_rx="\\<($$m4_builtin_rx)\\>|\\<_?(A[CUMHS]|m4)_"; \ + if ls tests/*.test | LC_ALL=C grep -E "$$m4_macro_rx"; then \ + echo "the names of the tests above can be problematic" 1>&2; \ + echo "Avoid test names that contain names of m4 macros" 1>&2; \ + exit 1; \ + fi sc_diff_automake_in_automake: @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 28; then \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 121d0a6a2..05870853f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -383,6 +383,7 @@ dirforbid.test \ dirlist.test \ dirlist2.test \ discover.test \ +dist-included-parent-dir.test \ distcleancheck.test \ distcom2.test \ distcom3.test \ @@ -461,6 +462,7 @@ gnuwarn2.test \ gnits.test \ gnits2.test \ gnits3.test \ +hdr-vars-defined-once.test \ header.test \ help.test \ help2.test \ @@ -480,8 +482,6 @@ help-upc.test \ hfs.test \ hosts.test \ implicit.test \ -include.test \ -include2.test \ info.test \ init.test \ init2.test \ @@ -602,6 +602,7 @@ ltlibsrc.test \ ltorder.test \ lzip.test \ lzma.test \ +m4-inclusion.test \ maintclean.test \ make.test \ makej.test \ @@ -818,7 +819,6 @@ silent-lex-generic.test \ silent-yacc-gcc.test \ silent-yacc-generic.test \ silent-nowarn.test \ -sinclude.test \ srcsub.test \ srcsub2.test \ space.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 1fe16e0ca..61cb70592 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -645,6 +645,7 @@ dirforbid.test \ dirlist.test \ dirlist2.test \ discover.test \ +dist-included-parent-dir.test \ distcleancheck.test \ distcom2.test \ distcom3.test \ @@ -723,6 +724,7 @@ gnuwarn2.test \ gnits.test \ gnits2.test \ gnits3.test \ +hdr-vars-defined-once.test \ header.test \ help.test \ help2.test \ @@ -742,8 +744,6 @@ help-upc.test \ hfs.test \ hosts.test \ implicit.test \ -include.test \ -include2.test \ info.test \ init.test \ init2.test \ @@ -864,6 +864,7 @@ ltlibsrc.test \ ltorder.test \ lzip.test \ lzma.test \ +m4-inclusion.test \ maintclean.test \ make.test \ makej.test \ @@ -1080,7 +1081,6 @@ silent-lex-generic.test \ silent-yacc-gcc.test \ silent-yacc-generic.test \ silent-nowarn.test \ -sinclude.test \ srcsub.test \ srcsub2.test \ space.test \ diff --git a/tests/defs b/tests/defs index cf0b49504..f6237d33b 100644 --- a/tests/defs +++ b/tests/defs @@ -170,7 +170,7 @@ commented_sed_unindent_prog=' unindent () { if test x"$sed_unindent_prog" = x; then - sed_unindent_prog=`echo "$commented_sed_unindent_prog" | sed -e "s/ *# .*//"` + sed_unindent_prog=`printf '%s\n' "$commented_sed_unindent_prog" | sed -e "s/ *# .*//"` fi sed "$sed_unindent_prog" ${1+"$@"} } diff --git a/tests/include2.test b/tests/dist-included-parent-dir.test index 9a75963fb..9a75963fb 100755 --- a/tests/include2.test +++ b/tests/dist-included-parent-dir.test diff --git a/tests/include.test b/tests/hdr-vars-defined-once.test index 2b272b9d2..2b272b9d2 100755 --- a/tests/include.test +++ b/tests/hdr-vars-defined-once.test diff --git a/tests/sinclude.test b/tests/m4-inclusion.test index 9fbde28ef..927f5212a 100755 --- a/tests/sinclude.test +++ b/tests/m4-inclusion.test @@ -19,13 +19,9 @@ . ./defs || Exit 1 -# Overwrite configure.in, because the default uses `sinclude' as package -# name and this play havoc with Autoconf on some platforms (`sinclude' -# is an m4 macro). -cat > configure.in <<EOF -AC_INIT([amsinclude], [1.0]) -AM_INIT_AUTOMAKE -AC_CONFIG_FILES([Makefile]) +set -e + +cat >> configure.in <<'EOF' sinclude([doesntexist.m4]) EOF |