[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-735-
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-735-gd555ae1 |
Date: |
Sat, 02 Apr 2011 14:04:44 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=d555ae188b43938b7d1742164e9ae774382d4edd
The branch, master has been updated
via d555ae188b43938b7d1742164e9ae774382d4edd (commit)
via d4df619bfa53ef0bd81fbbbe03b3672711defe2f (commit)
via e87c030d838a0c649239c9d2a632c1b2415852a0 (commit)
via 0a6a45503a44d149da77e1b3b35aa16592c1a258 (commit)
via e72a1b007f3ae165ded1af8a00dce83448c2ff2c (commit)
via 8d3571b9dddfcab822f7b62832070b2214a11ac9 (commit)
via 1dd55a48e354e57686879ea9900c8daf0402a10a (commit)
from fac422c8914f14acae106338ddd6efc0297c49e9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d555ae188b43938b7d1742164e9ae774382d4edd
Merge: fac422c d4df619
Author: Stefano Lattarini <address@hidden>
Date: Sat Apr 2 16:00:23 2011 +0200
Merge branch 'maint'
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 51 +++++++++
THANKS | 2 +
automake.in | 9 ++
doc/automake.texi | 8 +-
tests/Makefile.am | 4 +
tests/Makefile.in | 7 +-
tests/aclocal6.test | 20 +---
tests/check-exported-srcdir.test | 6 +-
.../{target-cflags.test => lex-subobj-nodep.test} | 63 ++++++------
tests/{maintclean.test => maintclean-vpath.test} | 51 +++++++--
tests/maintclean.test | 32 +++++-
tests/pr8365-remake-timing.test | 110 ++++++++++++++++++++
tests/subdir5.test | 23 +++--
tests/subdir8.test | 20 ++--
tests/yacc5.test | 7 +-
15 files changed, 317 insertions(+), 96 deletions(-)
copy tests/{target-cflags.test => lex-subobj-nodep.test} (55%)
copy tests/{maintclean.test => maintclean-vpath.test} (64%)
create mode 100755 tests/pr8365-remake-timing.test
diff --git a/ChangeLog b/ChangeLog
index 1eb9d42..d8750df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,54 @@
+2011-04-02 Stefano Lattarini <address@hidden>
+
+ 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 <address@hidden>
+
+ 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 <address@hidden>
+
+ 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 <address@hidden>
+
+ 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 <address@hidden>
tests: fix unindent to use printf not echo for script.
diff --git a/THANKS b/THANKS
index a4cf675..9a76e7f 100644
--- a/THANKS
+++ b/THANKS
@@ -132,6 +132,7 @@ Harlan Stenn address@hidden
He Li address@hidden
Henrik Frystyk Nielsen address@hidden
Ian Lance Taylor address@hidden
+Ignacy Gawedzki address@hidden
ÐлÑÑ Ð. ÐолÑбев address@hidden
Imacat address@hidden
Inoue address@hidden
@@ -225,6 +226,7 @@ Matthias Andree address@hidden
Matthias Clasen address@hidden
Matthias Klose address@hidden
Maxim Sinev address@hidden
+Maynard Johnson address@hidden
Merijn de Jonge address@hidden
Michael Brantley address@hidden
Michael Ploujnikov address@hidden
diff --git a/automake.in b/automake.in
index ef3b8a6..f9a6821 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 474f5a1..f89971b 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
address@hidden Scanning @file{configure.ac}
address@hidden Scanning @file{configure.ac}, using @command{aclocal}
@cindex @file{configure.ac}, scanning
@cindex Scanning @file{configure.ac}
address@hidden Using @command{aclocal}
address@hidden @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 0587085..7f165ac 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 61cb705..d1e3a73 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 f4f1fd3..905608c 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 dc02b22..5cec7fc 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/target-cflags.test b/tests/lex-subobj-nodep.test
similarity index 55%
copy from tests/target-cflags.test
copy to tests/lex-subobj-nodep.test
index 352808e..4449715 100755
--- a/tests/target-cflags.test
+++ b/tests/lex-subobj-nodep.test
@@ -1,6 +1,5 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002, 2004, 2010, 2011 Free Software
-# Foundation, Inc.
+# 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
@@ -15,58 +14,60 @@
# 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 to make sure target specific CFLAGS work
-# Assar Westerlund <address@hidden>
+# Ensure subdirs for subdir scanners are generated when subdir-objects
+# are used, even when dependency tracking is disabled.
-required=gcc
+required=flex
. ./defs || Exit 1
-cat >> configure.in << 'END'
+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 = no-dependencies
-
-bin_PROGRAMS = foo bar
-foo_CFLAGS = -DFOO
+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
-cat > foo.c << 'END'
-#include <stdio.h>
-#ifdef FOO
-int main(void) {
+mkdir sub1 sub2
+
+cat >sub1/s1.l <<\END
+%%
+"END" return EOF;
+.
+%%
+int main (void)
+{
+ while (yylex () != EOF)
+ ;
return 0;
}
-#endif
-END
-cat > bar.c << 'END'
-#ifndef FOO
-int main(void)
+int yywrap(void)
{
return 0;
}
-#endif
END
+cp sub1/s1.l sub2/s2.l
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
mkdir build
-
cd build
-../configure
-$MAKE
-./foo
-./bar
-cd ..
-
-./configure
+../configure --disable-dependency-tracking
+$MAKE sub1/s1.c
+$MAKE sub2/s2.c
+rm -rf sub1 sub2
$MAKE
-./foo
-./bar
:
diff --git a/tests/maintclean.test b/tests/maintclean-vpath.test
similarity index 64%
copy from tests/maintclean.test
copy to tests/maintclean-vpath.test
index 471c8ce..8dd2a95 100755
--- a/tests/maintclean.test
+++ b/tests/maintclean-vpath.test
@@ -1,6 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2010, 2011 Free Software Foundation,
-# Inc.
+# 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
@@ -16,25 +15,36 @@
# 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])
+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
@@ -42,36 +52,55 @@ $AUTOMAKE
# Users can disable autom4te.cache.
if test -d autom4te.cache; then
- test_cache='test -d autom4te.cache'
+ test_cache='test -d ../autom4te.cache'
else
test_cache=:
fi
-# Since we don't require Yacc, make sure it's not used.
-./configure YACC=false
+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
+../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
+test ! -d ../autom4te.cache
:
diff --git a/tests/maintclean.test b/tests/maintclean.test
index 471c8ce..aeda04c 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 0000000..079b0c0
--- /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 2f4a211..60730cb 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 01ff662..98146ba 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 1910924..bac61aa 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.
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-735-gd555ae1,
Stefano Lattarini <=