diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2011-04-02 16:00:23 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2011-04-02 16:00:23 +0200 |
commit | d555ae188b43938b7d1742164e9ae774382d4edd (patch) | |
tree | 116e5d2d935146b574c491bd675d2e98a5013d96 | |
parent | fac422c8914f14acae106338ddd6efc0297c49e9 (diff) | |
parent | d4df619bfa53ef0bd81fbbbe03b3672711defe2f (diff) | |
download | automake-d555ae188b43938b7d1742164e9ae774382d4edd.tar.gz |
Merge branch 'maint'
-rw-r--r-- | ChangeLog | 51 | ||||
-rw-r--r-- | THANKS | 2 | ||||
-rw-r--r-- | automake.in | 9 | ||||
-rw-r--r-- | doc/automake.texi | 8 | ||||
-rw-r--r-- | tests/Makefile.am | 4 | ||||
-rw-r--r-- | tests/Makefile.in | 7 | ||||
-rwxr-xr-x | tests/aclocal6.test | 20 | ||||
-rwxr-xr-x | tests/check-exported-srcdir.test | 6 | ||||
-rwxr-xr-x | tests/lex-subobj-nodep.test | 73 | ||||
-rwxr-xr-x | tests/maintclean-vpath.test | 106 | ||||
-rwxr-xr-x | tests/maintclean.test | 32 | ||||
-rwxr-xr-x | tests/pr8365-remake-timing.test | 110 | ||||
-rwxr-xr-x | tests/subdir5.test | 23 | ||||
-rwxr-xr-x | tests/subdir8.test | 20 | ||||
-rwxr-xr-x | tests/yacc5.test | 7 |
15 files changed, 424 insertions, 54 deletions
@@ -1,3 +1,54 @@ +2011-04-02 Stefano Lattarini <stefano.lattarini@gmail.com> + + tests: fix timestamp-related failures + Fixes automake bug#8365. + * tests/aclocal6.test: Sleep before modifying m4 files that should + trigger remake rules. Remove incorrect/obsoleted comments. + * tests/subdir5.test: Likewise, and extend a bit. + * tests/subdir8.test: Likewise. + * tests/pr8365-remake-timing.test: New xfailing test. + * tests/Makefile.am (TESTS): Update. + Report from Sam Steingold. + +2011-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + Create subdirs for generated sources even when not dep tracking. + * automake.in (handle_single_transform): If $object is derived + and lands in subdir, be sure to output a dirstamp dependency. + * tests/yacc5.test: Avoid falsely matching the dirstamp + dependency when grepping for a rule. + * tests/lex-subobj-nodep.test: New test. + * tests/Makefile.am (TESTS): Update. + * THANKS: Update. + Report by Ignacy Gawedzki. + + Fix locale issue in check-exported-srcdir.test. + * tests/check-exported-srcdir.test: Reformulate glob to not fail + in a locale that ignores or interleaves character case. + +2011-04-01 Stefano Lattarini <stefano.lattarini@gmail.com> + + docs: better visibility for aclocal in the index + * doc/automake.texi (@menu): Rename title for entry 'configure' + from "Scanning configure.ac or configure.in" to the more precise + "Scanning configure.ac, using aclocal". + (@detailmenu): Adjust. + (@node configure): Adjust, and extend @cindex calls accordingly. + * THANKS: Update. + From a report by Maynard Johnson. + +2011-03-30 Stefano Lattarini <stefano.lattarini@gmail.com> + + tests: improve tests on "maintainer-clean" target + * tests/aclocal6.test: Move checks related to "maintainer-clean" + functionalities into ... + * tests/maintclean-vpath.test: ... this new test. + * tests/maintclean.test: Update heading comments. Extend to also + test subdirs. Remove useless disabling of YACC. Fix m4 quoting + in configure.in. Add a trailing `:' command. Remove extra blank + lines. + * tests/Makefile.am (TESTS): Update. + 2011-03-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> tests: fix unindent to use printf not echo for script. @@ -132,6 +132,7 @@ Harlan Stenn Harlan.Stenn@pfcs.com He Li tippa000@yahoo.com Henrik Frystyk Nielsen frystyk@w3.org Ian Lance Taylor ian@cygnus.com +Ignacy Gawedzki i@lri.fr Илья Н. Голубев gin@mo.msk.ru Imacat imacat@mail.imacat.idv.tw Inoue inoue@ainet.or.jp @@ -225,6 +226,7 @@ Matthias Andree matthias.andree@gmx.de Matthias Clasen clasen@mathematik.uni-freiburg.de Matthias Klose doko@ubuntu.com Maxim Sinev good@goods.ru +Maynard Johnson maynardj@us.ibm.com Merijn de Jonge M.de.Jonge@cwi.nl Michael Brantley Michael-Brantley@deshaw.com Michael Ploujnikov ploujj@gmail.com diff --git a/automake.in b/automake.in index ef3b8a65b..f9a682141 100644 --- a/automake.in +++ b/automake.in @@ -2059,6 +2059,15 @@ sub handle_single_transform ($$$$$%) # derived from is not. &push_dist_common ($object) unless ($topparent =~ /^(?:nobase_)?nodist_/); + + # If resulting derived source is in a subdir, we need to make + # sure the subdir exists at build time. + if ($object =~ /\//) + { + my $dirstamp = require_build_directory_maybe ($object); + depend ($object, $dirstamp) + if ($dirstamp); + } next; } diff --git a/doc/automake.texi b/doc/automake.texi index 474f5a155..f89971b36 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -102,7 +102,7 @@ section entitled ``GNU Free Documentation License.'' * Generalities:: General ideas * Examples:: Some example packages * Invoking Automake:: Creating a Makefile.in -* configure:: Scanning configure.ac or configure.in +* configure:: Scanning configure.ac, using aclocal * Directories:: Declaring subdirectories * Programs:: Building programs and libraries * Other Objects:: Other derived objects @@ -175,7 +175,7 @@ Some example packages * Complete:: A simple example, start to finish * true:: Building true and false -Scanning @file{configure.ac} +Scanning @file{configure.ac}, using @command{aclocal} * Requirements:: Configuration requirements * Optional:: Other things Automake recognizes @@ -2706,10 +2706,12 @@ concurrently. This is an experimental feature. @node configure -@chapter Scanning @file{configure.ac} +@chapter Scanning @file{configure.ac}, using @command{aclocal} @cindex @file{configure.ac}, scanning @cindex Scanning @file{configure.ac} +@cindex Using @command{aclocal} +@cindex @command{aclocal}, using Automake scans the package's @file{configure.ac} to determine certain information about the package. Some @command{autoconf} macros are required diff --git a/tests/Makefile.am b/tests/Makefile.am index 05870853f..7f165ac46 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -25,6 +25,7 @@ auxdir2.test \ cond17.test \ gcj6.test \ override-conditional-2.test \ +pr8365-remake-timing.test \ txinfo5.test @@ -530,6 +531,7 @@ lex4.test \ lex5.test \ lexcpp.test \ lexvpath.test \ +lex-subobj-nodep.test \ lflags.test \ lflags2.test \ libexec.test \ @@ -604,6 +606,7 @@ lzip.test \ lzma.test \ m4-inclusion.test \ maintclean.test \ +maintclean-vpath.test \ make.test \ makej.test \ makej2.test \ @@ -784,6 +787,7 @@ remake10b.test \ remake10c.test \ remake11.test \ remake12.test \ +pr8365-remake-timing.test \ regex.test \ regex-obsolete.test \ req.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 61cb70592..d1e3a73eb 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -285,8 +285,8 @@ MAINTAINERCLEANFILES = $(parallel_tests) $(instspc_tests) EXTRA_DIST = ChangeLog-old gen-parallel-tests instspc-tests.sh \ $(TESTS) XFAIL_TESTS = all.test auxdir2.test cond17.test gcj6.test \ - override-conditional-2.test txinfo5.test \ - $(instspc_xfail_tests) + override-conditional-2.test pr8365-remake-timing.test \ + txinfo5.test $(instspc_xfail_tests) parallel_tests = backcompat5-p.test check-exported-srcdir-p.test \ check-tests-in-builddir-p.test check-tests_environment-p.test \ check-p.test check10-p.test check11-p.test check12-p.test \ @@ -792,6 +792,7 @@ lex4.test \ lex5.test \ lexcpp.test \ lexvpath.test \ +lex-subobj-nodep.test \ lflags.test \ lflags2.test \ libexec.test \ @@ -866,6 +867,7 @@ lzip.test \ lzma.test \ m4-inclusion.test \ maintclean.test \ +maintclean-vpath.test \ make.test \ makej.test \ makej2.test \ @@ -1046,6 +1048,7 @@ remake10b.test \ remake10c.test \ remake11.test \ remake12.test \ +pr8365-remake-timing.test \ regex.test \ regex-obsolete.test \ req.test \ diff --git a/tests/aclocal6.test b/tests/aclocal6.test index f4f1fd378..905608c39 100755 --- a/tests/aclocal6.test +++ b/tests/aclocal6.test @@ -42,19 +42,14 @@ $ACLOCAL -I m4 $AUTOCONF $AUTOMAKE --copy --add-missing -# Users can disable autom4te.cache. -if test -d autom4te.cache; then - test_cache='test -d' -else - test_cache=: -fi - mkdir build cd build ../configure $MAKE +# Modified configure dependencies must be newer than config.status. +$sleep # Update an aclocal.m4 dependency, then make sure all Makefiles # are updated, even from a sub-directory. echo 'AC_DEFUN([SOME_DEFS], [MORE_DEFS])' > ../m4/somedefs.m4 @@ -77,15 +72,4 @@ test -f $me-1.0/m4/moredefs.m4 test -f $me-1.0/m4/somedefs.m4 test -f $me-1.0/acinclude.m4 -# Make sure maintainer-clean works in VPATH builds. -# (This is unrelated to the rest of this test.) -$MAKE clean -$test_cache ../autom4te.cache -test -f Makefile -test -f sub/Makefile -$MAKE maintainer-clean -test ! -d ../autom4te.cache -test ! -f Makefile -test ! -f sub/Makefile - : diff --git a/tests/check-exported-srcdir.test b/tests/check-exported-srcdir.test index dc02b22df..5cec7fc85 100755 --- a/tests/check-exported-srcdir.test +++ b/tests/check-exported-srcdir.test @@ -32,9 +32,9 @@ show_info () fi } -mkdir SrcDir BuildDir - -mv [a-z]* SrcDir +mkdir SrcDir +mv [!S]* SrcDir +mkdir BuildDir cd SrcDir cat >> configure.in << 'END' diff --git a/tests/lex-subobj-nodep.test b/tests/lex-subobj-nodep.test new file mode 100755 index 000000000..444971515 --- /dev/null +++ b/tests/lex-subobj-nodep.test @@ -0,0 +1,73 @@ +#! /bin/sh +# Copyright (C) 2011 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/>. + +# Ensure subdirs for subdir scanners are generated when subdir-objects +# are used, even when dependency tracking is disabled. + +required=flex +. ./defs || Exit 1 + +set -e + +cat >>configure.in <<\END +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_LEX +AC_OUTPUT +END + +cat >Makefile.am <<\END +AUTOMAKE_OPTIONS = subdir-objects +bin_PROGRAMS = p1 p2 +p1_SOURCES = sub1/s1.l +p2_SOURCES = sub2/s2.l +p2_CPPFLAGS = -DWHATEVER +END + +mkdir sub1 sub2 + +cat >sub1/s1.l <<\END +%% +"END" return EOF; +. +%% +int main (void) +{ + while (yylex () != EOF) + ; + return 0; +} + +int yywrap(void) +{ + return 0; +} +END + +cp sub1/s1.l sub2/s2.l + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a +mkdir build +cd build +../configure --disable-dependency-tracking +$MAKE sub1/s1.c +$MAKE sub2/s2.c +rm -rf sub1 sub2 +$MAKE + +: diff --git a/tests/maintclean-vpath.test b/tests/maintclean-vpath.test new file mode 100755 index 000000000..8dd2a9542 --- /dev/null +++ b/tests/maintclean-vpath.test @@ -0,0 +1,106 @@ +#! /bin/sh +# Copyright (C) 2011 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/>. + +# Make sure distclean and maintainer-clean erase the right files. +# This test is for VPATH builds; see sister test `maintclean-vpath.test' +# for in-tree builds. + +. ./defs || Exit 1 + +set -e + +cat >> configure.in << 'END' +AC_CONFIG_FILES([bar sub/Makefile]) +AC_OUTPUT +END + +cat > Makefile.am <<'END' +SUBDIRS = sub +noinst_DATA = foo.c +foo.c: + touch foo.c +MAINTAINERCLEANFILES = foo.c +END + +mkdir sub +cat > sub/Makefile.am <<'END' +noinst_SCRIPTS = zap +zap: zap.sh + cp $(srcdir)/zap.sh $@ && chmod a+x $@ +MAINTAINERCLEANFILES = zap +END + +: > bar.in +: > sub/zap.sh + +$ACLOCAL +$AUTOCONF +$AUTOMAKE + +# Users can disable autom4te.cache. +if test -d autom4te.cache; then + test_cache='test -d ../autom4te.cache' +else + test_cache=: +fi + +mkdir build + +chmod a-w . sub + +cd build + +../configure +test -f bar + +$MAKE +test -f foo.c +test -f sub/zap +$test_cache + +$MAKE distclean +test ! -f bar +test ! -f Makefile +test ! -f sub/Makefile +test ! -f config.status +test -f foo.c +test -f sub/zap +test -f ../sub/zap.sh +$test_cache + +../configure +test -f bar + +$MAKE foo.c +test -f foo.c +cd sub +$MAKE zap +test -f zap +cd .. + +chmod u+w .. + +$MAKE maintainer-clean +test -f ../sub/zap.sh +test ! -f bar +test ! -f foo.c +test ! -f sub/zap +test ! -f Makefile +test ! -f sub/Makefile +test ! -f config.status +test ! -d ../autom4te.cache + +: diff --git a/tests/maintclean.test b/tests/maintclean.test index 471c8cea4..aeda04c30 100755 --- a/tests/maintclean.test +++ b/tests/maintclean.test @@ -16,25 +16,34 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Make sure distclean and maintainer-clean erase the right files. +# This test is for in-tree builds; see sister test `maintclean-vpath.test' +# for VPATH builds. . ./defs || Exit 1 cat >> configure.in << 'END' -AC_CONFIG_FILES([bar]) +AC_CONFIG_FILES([bar sub/Makefile]) AC_OUTPUT END cat > Makefile.am <<'END' +SUBDIRS = sub noinst_DATA = foo.c - foo.c: touch foo.c - MAINTAINERCLEANFILES = foo.c +END +mkdir sub +cat > sub/Makefile.am <<'END' +noinst_SCRIPTS = zap +zap: zap.sh + cp $(srcdir)/zap.sh $@ && chmod a+x $@ +MAINTAINERCLEANFILES = zap END -touch bar.in +: > bar.in +: > sub/zap.sh $ACLOCAL $AUTOCONF @@ -47,18 +56,22 @@ else test_cache=: fi -# Since we don't require Yacc, make sure it's not used. -./configure YACC=false +./configure test -f bar $MAKE test -f foo.c +test -f sub/zap +$test_cache $MAKE distclean test ! -f bar test ! -f Makefile +test ! -f sub/Makefile test ! -f config.status test -f foo.c +test -f sub/zap +test -f sub/zap.sh $test_cache ./configure @@ -66,11 +79,18 @@ test -f bar $MAKE foo.c test -f foo.c +cd sub +$MAKE zap +test -f zap +cd .. $MAKE maintainer-clean +test -f sub/zap.sh test ! -f bar test ! -f foo.c +test ! -f sub/zap test ! -f Makefile +test ! -f sub/Makefile test ! -f config.status test ! -d autom4te.cache diff --git a/tests/pr8365-remake-timing.test b/tests/pr8365-remake-timing.test new file mode 100755 index 000000000..079b0c00a --- /dev/null +++ b/tests/pr8365-remake-timing.test @@ -0,0 +1,110 @@ +#! /bin/sh +# Copyright (C) 2011 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 for automake bug#8365, related to Makefile remake rules. +# The bug is due to subtle timestamp issues and limitations in +# make's behaviour, and is very unlikely to be triggered (we have +# to resort to timestamp edit hacks to consistently expose it); in +# any account, it is nigh to impossible to trigger it by running +# make by hand. Thus, fixing it would not be worth the hassle, but +# we prefer to keep it exposed anyway. + +. ./defs || Exit 1 + +set -e + +# We'll use calls to stat to get debugging information. +if stat /dev/null; then stat=stat; else stat=:; fi + +cat >> configure.in << 'END' +FOOBAR=zardoz +AC_OUTPUT +END + +: > Makefile.am + +$ACLOCAL +# Run automake *before* autoconf, because we want to ensure that +# Makefile.in is not newer than configure. +$AUTOMAKE +$AUTOCONF + +./configure +$MAKE Makefile +$EGREP 'FOOBAR|zardoz' Makefile && Exit 99 # Sanity check. + +echo 'AC_SUBST([FOOBAR])' >> configure.in + +# Modified configure dependencies must have the same timestamp of +# config.status and Makefile in order to trigger the bug. +# We also re-touch config.status, because "touch -r" can truncate +# timestamps on file systems with sub-second resolutions (see the +# autoconf manual). Finally, we also sleep before touching, to ensure +# that the (possibly truncated) timestamps of config.status etc. are +# strictly newer than the non-truncated configure timestamp. +$stat config.status Makefile configure.in +$sleep +touch config.status +touch -r config.status config.status Makefile configure.in +$stat config.status Makefile configure.in + +# Also, the race condition is triggered only when aclocal, automake +# and aclocal run fast enough to keep the timestamp of the generated +# aclocal.m4, Makefile.in and configure equal to the timestamp of +# Makefile & config.status. To reproduce this race consistently, we +# need the following hackish wrappers. + +save_AUTOCONF=$AUTOCONF + +cat > aclocal-wrap <<END +#!/bin/sh +set -ex +# aclocal shouldn't use our autoconf wrapper when extracting +# the races from configure.in. +AUTOCONF='$save_AUTOCONF'; export AUTOCONF +$ACLOCAL "\$@" +touch -r config.status aclocal.m4 +$stat aclocal.m4 +END + +cat > automake-wrap <<END +#!/bin/sh +set -ex +# automake shouldn't use our autoconf wrapper when extracting +# the races from configure.in. +AUTOCONF='$save_AUTOCONF'; export AUTOCONF +$AUTOMAKE "\$@" +touch -r config.status Makefile.in +$stat Makefile.in +END + +cat > autoconf-wrap <<END +#!/bin/sh +set -ex +$AUTOCONF "\$@" +touch -r config.status configure +$stat configure +END + +chmod a+x aclocal-wrap automake-wrap autoconf-wrap + +env \ + ACLOCAL=./aclocal-wrap AUTOMAKE=./automake-wrap AUTOCONF=./autoconf-wrap \ + $MAKE -e Makefile +grep '^FOOBAR =' Makefile.in +grep '^FOOBAR *= *zardoz *$' Makefile + +: diff --git a/tests/subdir5.test b/tests/subdir5.test index 2f4a211f2..60730cbe8 100755 --- a/tests/subdir5.test +++ b/tests/subdir5.test @@ -53,18 +53,14 @@ $AUTOMAKE --include-deps --copy --add-missing $MAKE # Now add new directories. -# -# We shouldn't need to $sleep here: configure ensures that files -# generated by it are newer than configure. Thus, even if -# Makefile.in is newer than configure but the updated Makefile.am -# below has the same timestamp as Makefile.in, the latter should -# be rebuilt due to its dependency on configure.in. # First we add a new directory by modifying configure.in directly. # We update configure.in *before* updating sub/Makefile.am; subdir8.test # does it in the other way: it updates confiles.m4 (which is m4_included # by configure.in there) after Makefile.am. +# Modified configure dependencies must be newer than config.status. +$sleep sed <configure.in >configure.tmp -e '/^AC_OUTPUT$/i\ AC_CONFIG_FILES([maude/Makefile])\ m4_include([confile.m4])\ @@ -87,11 +83,15 @@ echo 'SUBDIRS = maude' >> Makefile.am # We want a simple rebuild to create maude/Makefile automatically. $MAKE +grep '^SUBDIRS = *maude *$' Makefile.in +grep '^SUBDIRS = *maude *$' Makefile test -f maude/Makefile # Then we add a new directory by modifying a file included (through # `m4_include') by configure.in. mkdir maude2 +# Modified configure dependencies must be newer than config.status. +$sleep cat >> confile.m4 << 'END' AC_CONFIG_FILES([maude2/Makefile]) AC_SUBST([GREPME]) @@ -102,8 +102,13 @@ echo 'SUBDIRS += maude2' >> Makefile.am # We want a simple rebuild to create maude2/Makefile and update # all other Makefiles automatically. $MAKE -grep '^GREPME =' Makefile -grep '^GREPME =' maude/Makefile -grep '^GREPME =' maude2/Makefile +grep '^SUBDIRS =.* maude2' Makefile.in +grep '^SUBDIRS =.* maude2' Makefile + +for ext in '.in' ''; do + for d in . maude maude2; do + grep '^GREPME =' $d/Makefile$ext + done +done : diff --git a/tests/subdir8.test b/tests/subdir8.test index 01ff66250..98146ba50 100755 --- a/tests/subdir8.test +++ b/tests/subdir8.test @@ -67,12 +67,6 @@ $AUTOMAKE --copy --add-missing $MAKE # Now add new directories. -# -# We shouldn't need to $sleep here: configure ensures that files -# generated by it are newer than configure. Thus, even if -# Makefile.in is newer than configure but the updated Makefile.am -# below has the same timestamp as Makefile.in, the latter should -# be rebuilt due to its dependency on configure.in. # The first step users typically do when adding a new subdir is # editing configure.in. That is already tested by subdir5.test, @@ -93,6 +87,9 @@ mkdir maude # Update confiles.m4 *after* updating sub/Makefile.am; subdir5.test do # it in the other way: it updates configure.in before Makefile.am. +# We sleep here because modified configure dependencies must be newer +# than config.status. +$sleep echo 'AC_CONFIG_FILES([maude/Makefile sub/maude/Makefile])' >> confiles.m4 # We want a simple rebuild from sub/ to create sub/maude/Makefile @@ -100,6 +97,8 @@ echo 'AC_CONFIG_FILES([maude/Makefile sub/maude/Makefile])' >> confiles.m4 cd sub $MAKE cd .. +grep '^SUBDIRS = *maude *$' sub/Makefile.in +grep '^SUBDIRS = *maude *$' sub/Makefile test -f maude/Makefile test -f sub/maude/Makefile @@ -108,9 +107,10 @@ test -f sub/maude/Makefile echo 'AC_DEFUN([MORE_DEFS], [AC_SUBST([GREPME])])' > m4/moredefs.m4 $MAKE -grep '^GREPME =' Makefile -grep '^GREPME =' maude/Makefile -grep '^GREPME =' sub/Makefile -grep '^GREPME =' sub/maude/Makefile +for ext in '.in' ''; do + for d in . maude sub sub/maude; do + grep '^GREPME =' $d/Makefile$ext + done +done : diff --git a/tests/yacc5.test b/tests/yacc5.test index 191092483..bac61aa34 100755 --- a/tests/yacc5.test +++ b/tests/yacc5.test @@ -38,7 +38,7 @@ mkdir sub $ACLOCAL $AUTOMAKE -a -grep '^maude\.c:' Makefile.in +grep '^maude\.c:.*maude\.y' Makefile.in ## Try again with subdir-objects. @@ -52,8 +52,9 @@ END $ACLOCAL $AUTOMAKE -a -# No rule needed, the default .y.c: inference rule is enough. -grep '^sub/maude\.c:' Makefile.in && Exit 1 +# No rule needed, the default .y.c: inference rule is enough +# (but there may be an additional dependency on a dirstamp file). +grep '^sub/maude\.c:.*maude\.y' Makefile.in && Exit 1 ## Try again with per-exe flags. |