[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-836-
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-836-g2aa8c8e |
Date: |
Wed, 01 Jun 2011 18:25:08 +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=2aa8c8e8829c255a20030cc8dd1e02e930d63698
The branch, master has been updated
via 2aa8c8e8829c255a20030cc8dd1e02e930d63698 (commit)
via 67ca6940688ed14d84642b34df4f28a07b9d9f00 (commit)
via bee9871d6a8743b7f01789f196c214354e7f612a (commit)
from 3eb059190213c60a9f201f671f1c69d6eed6bd7d (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 2aa8c8e8829c255a20030cc8dd1e02e930d63698
Merge: 3eb0591 67ca694
Author: Stefano Lattarini <address@hidden>
Date: Wed Jun 1 19:37:18 2011 +0200
Merge branch 'maint'
* maint:
remake: behave better with non-GNU make in subdirectories
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 15 ++++
Makefile.in | 2 +-
lib/am/configure.am | 2 +-
tests/Makefile.am | 4 +
tests/Makefile.in | 4 +
...ubdir10.test => remake-subdir-from-subdir.test} | 31 ++++++--
tests/remake-subdir-gnu.test | 80 +++++++++++++++++++
...ake-deleted-m4-file.test => remake-subdir.test} | 81 +++++++++++---------
tests/remake-subdir2.test | 82 ++++++++++++++++++++
9 files changed, 256 insertions(+), 45 deletions(-)
copy tests/{subdir10.test => remake-subdir-from-subdir.test} (57%)
create mode 100755 tests/remake-subdir-gnu.test
copy tests/{remake-deleted-m4-file.test => remake-subdir.test} (50%)
create mode 100755 tests/remake-subdir2.test
diff --git a/ChangeLog b/ChangeLog
index cb8adbc..5e82c6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2011-05-29 Stefano Lattarini <address@hidden>
+ remake: behave better with non-GNU make in subdirectories
+ Currently, with every decent make program, it is possible to
+ rebuild out-of-date autotools-generated files with a simple
+ "make Makefile" -- but for this to work reliably with non-GNU
+ make implementations, the command must be issued from the
+ top-level directory. This patch removes such limitation.
+ * lib/am/configure.am (am--refresh): Depend on `%MAKEFILE%'.
+ * tests/remake-subdir.test: New test.
+ * tests/remake-subdir2.test: Likewise.
+ * tests/remake-subdir-gnu.test: Likewise.
+ * tests/remake-subdir-from-subdir.test: Likewise.
+ * tests/Makefile.am (TESTS): Update.
+
+2011-05-29 Stefano Lattarini <address@hidden>
+
automake, aclocal: honour configure-time AUTOCONF and AUTOM4TE
Currently, the Automake's own configure script allow definition
of AUTOCONF and AUTOM4TE, expected to point respectively to an
diff --git a/Makefile.in b/Makefile.in
index 30a06c9..d2573f3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -395,7 +395,7 @@ texinfo.tex
all: all-recursive
.SUFFIXES:
-am--refresh:
+am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
diff --git a/lib/am/configure.am b/lib/am/configure.am
index e9299d6..d00846a 100644
--- a/lib/am/configure.am
+++ b/lib/am/configure.am
@@ -22,7 +22,7 @@
## %MAKEFILE% is updated before considering the am--refresh target.
if %?TOPDIR_P%
.PHONY: am--refresh
-am--refresh:
+am--refresh: %MAKEFILE%
@:
endif %?TOPDIR_P%
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d1a3cda..e68f6d7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -807,6 +807,10 @@ remake10b.test \
remake10c.test \
remake11.test \
remake12.test \
+remake-subdir-from-subdir.test \
+remake-subdir-gnu.test \
+remake-subdir.test \
+remake-subdir2.test \
remake-gnulib-add-acsubst.test \
remake-gnulib-add-header.test \
remake-gnulib-remove-header.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 44f8c97..7e5fd09 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1074,6 +1074,10 @@ remake10b.test \
remake10c.test \
remake11.test \
remake12.test \
+remake-subdir-from-subdir.test \
+remake-subdir-gnu.test \
+remake-subdir.test \
+remake-subdir2.test \
remake-gnulib-add-acsubst.test \
remake-gnulib-add-header.test \
remake-gnulib-remove-header.test \
diff --git a/tests/subdir10.test b/tests/remake-subdir-from-subdir.test
similarity index 57%
copy from tests/subdir10.test
copy to tests/remake-subdir-from-subdir.test
index b6daff5..1e369f8 100755
--- a/tests/subdir10.test
+++ b/tests/remake-subdir-from-subdir.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009 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
@@ -14,24 +14,43 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# SUDBIRS with $fail set in the environment.
+# Check that remake rules works for adding a new subdirectory from a
+# pre-existing subdirectory.
. ./defs || Exit 1
-mkdir sub
+set -e
cat >> configure.in <<'END'
-AC_CONFIG_FILES([sub/Makefile])
+m4_include([subdirs.m4])
+AC_SUBST([MAGIC], [magic])
AC_OUTPUT
END
-echo SUBDIRS = sub >Makefile.am
+echo 'AC_CONFIG_FILES([sub/Makefile])' > subdirs.m4
+echo 'SUBDIRS = sub' > Makefile.am
+
+mkdir sub
: > sub/Makefile.am
$ACLOCAL
$AUTOCONF
$AUTOMAKE
+
./configure
-env fail=1 $MAKE all clean
+$MAKE
+
+cd sub
+$sleep
+echo 'AC_CONFIG_FILES([sub/subsub/Makefile])' >> ../subdirs.m4
+echo 'SUBDIRS = subsub' >> Makefile.am
+mkdir subsub
+cat > subsub/Makefile.am <<'END'
+all-local:
+ : > ok-it-works
+END
+using_gmake || $MAKE Makefile
+$MAKE
+test -f subsub/ok-it-works
:
diff --git a/tests/remake-subdir-gnu.test b/tests/remake-subdir-gnu.test
new file mode 100755
index 0000000..cc683f3
--- /dev/null
+++ b/tests/remake-subdir-gnu.test
@@ -0,0 +1,80 @@
+#! /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/>.
+
+# Check that remake rules works from subdirectories, even using
+# `GNUmakefile' as makefiles name. This obviously requires GNU
+# make.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+magic1='::MagicString::One::'
+magic2='__MagicString__Two__'
+
+debug_info ()
+{
+ grep -i magic configure GNUmakefile.in GNUmakefile \
+ sub/GNUmakefile.in sub/GNUmakefile
+}
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([GNUmakefile sub/GNUmakefile])
+AC_SUBST([MAGIC], [magic])
+AC_OUTPUT
+END
+
+cat > GNUmakefile.am <<'END'
+SUBDIRS = sub
+END
+
+mkdir sub
+: > sub/GNUmakefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE
+debug_info
+
+$sleep
+sed "s|magic|$magic1|" configure.in > t
+mv -f t configure.in
+cd sub
+$MAKE
+cd ..
+debug_info
+$FGREP $magic1 configure
+$FGREP $magic1 GNUmakefile
+$FGREP $magic1 sub/GNUmakefile
+
+$sleep
+cd sub
+echo MAGIC = $magic2 >> GNUmakefile.am
+$MAKE
+cd ..
+debug_info
+$FGREP $magic2 sub/GNUmakefile
+$FGREP $magic2 sub/GNUmakefile.in
+$FGREP $magic1 sub/GNUmakefile sub/GNUmakefile.in && Exit 1
+$FGREP $magic2 GNUmakefile GNUmakefile.in && Exit 1
+
+:
diff --git a/tests/remake-deleted-m4-file.test b/tests/remake-subdir.test
similarity index 50%
copy from tests/remake-deleted-m4-file.test
copy to tests/remake-subdir.test
index f71d882..5bbc345 100755
--- a/tests/remake-deleted-m4-file.test
+++ b/tests/remake-subdir.test
@@ -14,61 +14,68 @@
# 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 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.test'.
+# Check that remake rules works from subdirectories, even with non-GNU
+# make implementations.
. ./defs || Exit 1
-cat >> configure.in <<'END'
-FOO_MACRO
-AC_OUTPUT
-END
+set -e
-cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
-.PHONY: test
-test:
- test '$(the_answer)' -eq 42
-END
+if using_gmake; then
+ remake=$MAKE
+else
+ remake="$MAKE Makefile"
+fi
-macro_value='the_answer=42; AC_SUBST([the_answer])'
+magic1='::MagicString::One::'
+magic2='__MagicString__Two__'
-mkdir m4
+debug_info ()
+{
+ grep -i magic configure Makefile.in Makefile sub/Makefile.in sub/Makefile
+}
-cat > m4/foo.m4 <<'END'
-AC_DEFUN([FOO_MACRO], [BAR_MACRO])
+cat >> configure.in <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_SUBST([MAGIC], [magic])
+AC_OUTPUT
END
-cat > m4/bar.m4 <<END
-AC_DEFUN([BAR_MACRO], [$macro_value])
+cat > Makefile.am <<'END'
+SUBDIRS = sub
END
-$ACLOCAL -I m4
+mkdir sub
+: > sub/Makefile.am
+
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
./configure
-$MAKE test
+$MAKE
+debug_info
$sleep
-
-sed -e "s|BAR_MACRO|$macro_value|" m4/foo.m4 > t
-mv -f t m4/foo.m4
-rm -f m4/bar.m4
-
-using_gmake || $MAKE Makefile
-$MAKE test
-
-$sleep
-
-sed -e "s|FOO_MACRO|$macro_value|" configure.in > t
+sed "s|magic|$magic1|" configure.in > t
mv -f t configure.in
-rm -f m4/foo.m4
+cd sub
+$remake
+cd ..
+debug_info
+$FGREP $magic1 configure
+$FGREP $magic1 Makefile
+$FGREP $magic1 sub/Makefile
-using_gmake || $MAKE Makefile
-$MAKE test
+$sleep
+cd sub
+echo MAGIC = $magic2 >> Makefile.am
+$remake
+cd ..
+debug_info
+$FGREP $magic2 sub/Makefile
+$FGREP $magic2 sub/Makefile.in
+$FGREP $magic1 sub/Makefile sub/Makefile.in && Exit 1
+$FGREP $magic2 Makefile Makefile.in && Exit 1
:
diff --git a/tests/remake-subdir2.test b/tests/remake-subdir2.test
new file mode 100755
index 0000000..09d1a36
--- /dev/null
+++ b/tests/remake-subdir2.test
@@ -0,0 +1,82 @@
+#! /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/>.
+
+# Check that remake rules works from subdirectories, even when makefiles
+# are not named "Makefile".
+
+. ./defs || Exit 1
+
+set -e
+
+magic1='::MagicString::One::'
+magic2='__MagicString__Two__'
+
+debug_info ()
+{
+ grep -i magic configure build.in build.mk sub/build.in sub/build.mk
+}
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([build.mk:build.in])
+AC_CONFIG_FILES([sub/build.mk:sub/build.in])
+AC_SUBST([MAGIC], [magic])
+AC_OUTPUT
+END
+
+cat > build.am <<'END'
+AM_MAKEFLAGS = -f build.mk
+SUBDIRS = sub
+END
+
+mkdir sub
+cat > sub/build.am <<'END'
+AM_MAKEFLAGS = -f build.mk
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+ls -l # For debugging.
+
+$MAKE -f build.mk
+debug_info
+
+$sleep
+sed "s|magic|$magic1|" configure.in > t
+mv -f t configure.in
+cd sub
+$MAKE -f build.mk build.mk
+cd ..
+debug_info
+$FGREP $magic1 configure
+$FGREP $magic1 build.mk
+$FGREP $magic1 sub/build.mk
+
+$sleep
+cd sub
+echo MAGIC = $magic2 >> build.am
+$MAKE -f build.mk build.mk
+cd ..
+debug_info
+$FGREP $magic2 sub/build.mk
+$FGREP $magic2 sub/build.in
+$FGREP $magic1 sub/build.in sub/build.mk && Exit 1
+$FGREP $magic2 build.in build.mk && Exit 1
+
+:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-836-g2aa8c8e,
Stefano Lattarini <=