automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-10-272-g31a0b6b
Date: Sat, 07 Mar 2009 08:06:25 +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=31a0b6b54782f24dd7ed84d257095078c1d6e937

The branch, master has been updated
       via  31a0b6b54782f24dd7ed84d257095078c1d6e937 (commit)
      from  f55440a1497d8653b01324d74a4418a1847146f6 (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 31a0b6b54782f24dd7ed84d257095078c1d6e937
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Mar 7 09:00:19 2009 +0100

    Improve `make -n dist' and `make -n distcheck' for GNU make.
    
    Ensure that `make -n dist' and `make -n distcheck' do not change
    files, due to GNU make executing rules containing `$(MAKE)'.
    
    * lib/am/distdir.am (distdir): Separate the creation of
    `$(distdir)/$$subdir' for `$(DIST_SUBDIRS)' and the recursion
    into the `$(DIST_SUBDIRS)' in two separate rule commands.
    (distcheck): Exit recursive rule early when run with `make -n',
    as detected by a witness file.
    * tests/maken.test, tests/maken2.test: New tests.
    * tests/Makefile.am: Update.
    * NEWS: Update.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                            |   14 ++++++++++++
 Makefile.in                          |    5 ++++
 NEWS                                 |    3 ++
 lib/Automake/Makefile.in             |    4 +++
 lib/Makefile.in                      |    4 +++
 lib/am/distdir.am                    |   12 ++++++++++
 tests/Makefile.am                    |    2 +
 tests/Makefile.in                    |    2 +
 tests/{txinfo32.test => maken.test}  |   37 ++++++++++++++++++++++++-------
 tests/{txinfo32.test => maken2.test} |   39 ++++++++++++++++++++++++++-------
 10 files changed, 104 insertions(+), 18 deletions(-)
 copy tests/{txinfo32.test => maken.test} (56%)
 copy tests/{txinfo32.test => maken2.test} (54%)

diff --git a/ChangeLog b/ChangeLog
index 3625020..c37f9e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2009-03-07  Ralf Wildenhues  <address@hidden>
 
+       Improve `make -n dist' and `make -n distcheck' for GNU make.
+       Ensure that `make -n dist' and `make -n distcheck' do not change
+       files, due to GNU make executing rules containing `$(MAKE)'.
+       * lib/am/distdir.am (distdir): Separate the creation of
+       `$(distdir)/$$subdir' for `$(DIST_SUBDIRS)' and the recursion
+       into the `$(DIST_SUBDIRS)' in two separate rule commands.
+       (distcheck): Exit recursive rule early when run with `make -n',
+       as detected by a witness file.
+       * tests/maken.test, tests/maken2.test: New tests.
+       * tests/Makefile.am: Update.
+       * NEWS: Update.
+
+2009-03-07  Ralf Wildenhues  <address@hidden>
+
        Solaris make testsuite fixes.
        * tests/check10.test: When a rule fails, Solaris make will
        output the complete command that failed; in this case the test
diff --git a/Makefile.in b/Makefile.in
index 6dde4e5..d1c4615 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -494,6 +494,10 @@ distdir: $(DISTFILES)
            test -d "$(distdir)/$$subdir" \
            || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
            dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
            $(am__relativize); \
            new_distdir=$$reldir; \
@@ -582,6 +586,7 @@ distcheck: dist
        mkdir $(distdir)/_build
        mkdir $(distdir)/_inst
        chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 
's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
          && $(am__cd) $(distdir)/_build \
diff --git a/NEWS b/NEWS
index 6fcc1a5..d4b59e9 100644
--- a/NEWS
+++ b/NEWS
@@ -170,6 +170,9 @@ Bugs fixed in 1.10a:
     containing the error message, but exit successfully.  However, `make dist'
     will ensure that no such bogus man pages are packaged into a tarball.
 
+  - Targets provided by automake behave better with `make -n', in that they
+    take care not to create files.
+
 * Bugs introduced by 1.10:
 
   - Fix output of dummy dependency files in presence of post-processed
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index 3217731..d5cb888 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -477,6 +477,10 @@ distdir: $(DISTFILES)
            test -d "$(distdir)/$$subdir" \
            || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
            dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
            $(am__relativize); \
            new_distdir=$$reldir; \
diff --git a/lib/Makefile.in b/lib/Makefile.in
index f45ea0b..8a74896 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -452,6 +452,10 @@ distdir: $(DISTFILES)
            test -d "$(distdir)/$$subdir" \
            || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
            dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
            $(am__relativize); \
            new_distdir=$$reldir; \
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 5acfa49..ad5e771 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -220,12 +220,18 @@ endif %?TOPDIR_P%
 ## directory, then we use `distdir' instead of `top_distdir'; this lets
 ## us work correctly with an enclosing package.
 ##
+## Split the loop for the directory creation and the one for recursion,
+## so that with GNU make -n, only the latter is executed.
 if %?SUBDIRS%
        @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d "$(distdir)/$$subdir" \
            || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
            dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
            $(am__relativize); \
            new_distdir=$$reldir; \
@@ -418,6 +424,12 @@ distcheck: dist
        mkdir $(distdir)/_inst
 ## Undo the write access.
        chmod a-w $(distdir)
+## With GNU make, the following command will be executed even with `make -n',
+## due to the presence of `$(MAKE)'.  That is normally all well (and `$(MAKE)'
+## is necessary for things like parallel distcheck), but here we don't want
+## execution.  To avoid MAKEFLAGS parsing hassles, use a witness file that a
+## non-`-n' run would have just created.
+       test -d $(distdir)/_build || exit 0; \
 ## Compute the absolute path of `_inst'.  Strip any leading DOS drive
 ## to allow DESTDIR installations.  Otherwise "$(DESTDIR)$(prefix)" would
 ## expand to "c:/temp/am-dc-5668/c:/src/package/package-1.0/_inst".
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d4687f4..15e8e61 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -393,6 +393,8 @@ lzma.test \
 maintclean.test \
 make.test \
 makej.test \
+maken.test \
+maken2.test \
 makevars.test \
 man.test \
 man2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index dc0a339..5cece90 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -548,6 +548,8 @@ lzma.test \
 maintclean.test \
 make.test \
 makej.test \
+maken.test \
+maken2.test \
 makevars.test \
 man.test \
 man2.test \
diff --git a/tests/txinfo32.test b/tests/maken.test
similarity index 56%
copy from tests/txinfo32.test
copy to tests/maken.test
index 267c0e9..8219ec6 100755
--- a/tests/txinfo32.test
+++ b/tests/maken.test
@@ -14,29 +14,48 @@
 # 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 the documentation targets work as required with BSD make,
-# even in the presence of subdirs (requires presence of default *-am rules).
+# Ensure that `make -n dist' and `make -n distcheck' do not change files
+# on disk, due to GNU make executing rules containing `$(MAKE)'.
+
+# Please keep this test in sync with sister test maken2.test.
 
 . ./defs || Exit 1
 
 set -e
 
 mkdir sub
-cat >>configure.in <<'END'
+
+cat >> configure.in << 'END'
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
 END
-cat >Makefile.am <<'END'
+
+cat > Makefile.am <<'END'
 SUBDIRS = sub
+distcheck-hook:
+       @: > stamp-distcheck-hook
+test-no-distdir:
+       test ! -d $(distdir)
+       test ! -f stamp-distcheck-hook
+       test ! -f sub/stamp-sub-dist-hook
+END
+cat >sub/Makefile.am <<'END'
+dist-hook:
+       @: > stamp-sub-dist-hook
 END
-: >sub/Makefile.am
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
-./configure "--prefix=`pwd`/inst"
-$MAKE html dvi ps pdf info \
-      install-html install-dvi install-ps install-pdf install-info \
-      install-man install-data install-exec install uninstall
+./configure
+
+$sleep
+echo stamp > stampfile
+$sleep
+for target in dist distcheck; do
+  $MAKE -n $target
+  $MAKE test-no-distdir
+  test `ls -1t | sed 1q` = stampfile
+done
 
 Exit 0
diff --git a/tests/txinfo32.test b/tests/maken2.test
similarity index 54%
copy from tests/txinfo32.test
copy to tests/maken2.test
index 267c0e9..4569375 100755
--- a/tests/txinfo32.test
+++ b/tests/maken2.test
@@ -14,29 +14,50 @@
 # 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 the documentation targets work as required with BSD make,
-# even in the presence of subdirs (requires presence of default *-am rules).
+# Ensure that `make -n dist' and `make -n distcheck' show what would happen.
+# This currently works for GNU make only.
 
+# Please keep this test in sync with sister test maken.test.
+
+required=GNUmake
 . ./defs || Exit 1
 
 set -e
 
 mkdir sub
-cat >>configure.in <<'END'
+
+cat >> configure.in << 'END'
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
 END
-cat >Makefile.am <<'END'
+
+cat > Makefile.am <<'END'
 SUBDIRS = sub
+distcheck-hook:
+       @: > stamp-distcheck-hook
+test-no-distdir:
+       test ! -d $(distdir)
+       test ! -f stamp-distcheck-hook
+       test ! -f sub/stamp-sub-dist-hook
+END
+cat >sub/Makefile.am <<'END'
+dist-hook:
+       @: > stamp-sub-dist-hook
 END
-: >sub/Makefile.am
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
-./configure "--prefix=`pwd`/inst"
-$MAKE html dvi ps pdf info \
-      install-html install-dvi install-ps install-pdf install-info \
-      install-man install-data install-exec install uninstall
+./configure
+
+$sleep
+echo stamp > stampfile
+$sleep
+for target in dist distcheck; do
+  $MAKE -n $target
+  $MAKE test-no-distdir
+  $MAKE -n $target | grep stamp-sub-dist-hook
+  test `ls -1t | sed 1q` = stampfile
+done
 
 Exit 0


hooks/post-receive
--
GNU Automake




reply via email to

[Prev in Thread] Current Thread [Next in Thread]