[Top][All Lists]

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

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.1

From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.1-577-gdafb5ba
Date: Fri, 06 Jul 2012 19:06:52 +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".;a=commitdiff;h=dafb5ba1769b3db01547646212b8c7babb408730

The branch, ng/master has been updated
       via  dafb5ba1769b3db01547646212b8c7babb408730 (commit)
       via  decd002437a649c617bd2bd4079bf6e603c474e8 (commit)
      from  db4d85abb25a3c9df95cdff367eb0d0e26be4e6d (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 dafb5ba1769b3db01547646212b8c7babb408730
Merge: db4d85a decd002
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 6 20:13:51 2012 +0200

    Merge branch 'ng/built-sources' into ng/master
    * ng/built-sources:
      [ng] built sources: avoid unconditional recursive make invocation

commit decd002437a649c617bd2bd4079bf6e603c474e8
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 3 11:46:56 2012 +0200

    [ng] built sources: avoid unconditional recursive make invocation
    With this change, the times for a null-build of GNU coreutils (as
    averaged from ten builds on an aging Debian system) drops from
    ~3.8 seconds to ~2.6 seconds.
    With this change, the semantic of $(BUILT_SOURCES) support is slightly
    altered, in that $(BUILT_SOURCES) will now be built not only before
    the "all", "check" or "install" targets, but before *any* target.
    We believe that not only this change in semantics is justified by
    the enhanced performance, but that the new semantics is actually
    better than the old one.  So a double win.  The new and more complex
    implementation is a price worth paying for those improvements.
    * lib/am/ New implementation of $(BUILT_SOURCES) support,
    using more GNU make features (mostly, automatic remake of include
    files and automatic restart in the face of rebuilt makefiles).  This
    new implementation should ensure that $(BUILT_SOURCES) will be built
    before before any other target.
    * lib/am/, lib/am/ Simplify: now there's
    no need to explicitly cater for $(BUILT_SOURCES) in the 'check' and
    'install' targets.
    * t/ Adjust and enhance a little.
    * t/ Trivial adjustment (relying on the
    fact that .PHONY works correctly for GNU make, also when applied to
    targets that are existing files).
    * t/ Adjust, to avoid GNU make erroneously remove a
    generated header thinking it is an intermediate file.
    * t/ Adjust: we should expect non-existing
    $(BUILT_SOURCES) to be rebuilt by *any* make invocation.
    * t/ Likewise.
    * NG-NEWS (Source Files with Unknown Extensions): Adjust the example
    to mirror the change.
    (Miscellaneous): Document the new $(BUILT_SOURCES) semantic.
    Signed-off-by: Stefano Lattarini <address@hidden>


Summary of changes:
 NG-NEWS                          |    6 +++-
 lib/am/             |   26 ++++++++++++------
 lib/am/           |    6 ----
 lib/am/                |    5 ---
 t/        |    4 ++-
 t/ |    3 +-
 t/                  |    2 +-
 t/        |   51 +++-----------------------------------
 t/              |    5 +---
 9 files changed, 33 insertions(+), 75 deletions(-)

diff --git a/NG-NEWS b/NG-NEWS
index 8e77df7..22e2dfc 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -358,7 +358,7 @@ Source Files with Unknown Extensions
       # This will work.
             $(preprocess-header) $< >$@
-      foo_SOURCES = foo.c
+      foo_SOURCES = foo.c foo.h
       EXTRA_DIST =
       BUILT_SOURCES = foo.h
@@ -386,6 +386,10 @@ Miscellaneous
 * The Automake-generated clean targets do not exit successfully anymore if
   an error occurs while removing a file or directory.
+* The semantic of $(BUILT_SOURCES) support has been slightly altered; now,
+  the files listed in $(BUILT_SOURCES) will be built not only before the
+  "all", "check" or "install" targets, but before *any* target.
 Copyright (C) 2012 Free Software Foundation, Inc.
diff --git a/lib/am/ b/lib/am/
index 25b075a..9e69726 100644
--- a/lib/am/
+++ b/lib/am/
@@ -21,14 +21,22 @@ ifdef SUBDIRS
 .PHONY: all-recursive
-all-am: all-local %ALL-DEPS%
-# We need to make sure config.h is built before we recurse.
-# We also want to make sure that built sources are built
-# before any ordinary 'all' targets are run.
-ifeq ($(strip %LOCAL-HEADERS% $(BUILT_SOURCES)),)
-all: $(if $(SUBDIRS),all-recursive,all-am)
+# We need to make sure $(BUILT_SOURCES) files are built before
+# any "ordinary" target (all, check, install, ...) is run.
+# Ditto for config.h (or files specified in AC_CONFIG_HEADERS).
+# But of course, we shouldn't attempt to build any of them when
+# running in dry mode.
+am.built-early = %LOCAL-HEADERS% $(BUILT_SOURCES)
+ifeq ($(am__make_dryrun),true)
+# A trick to make the "make -n" output more useful, albeit not
+# completely accurate.
+all check install: | $(am.built-early)
-       $(MAKE) $(if $(SUBDIRS),all-recursive,all-am)
+$(foreach x,$(am.built-early),$(eval -include .am/built-sources/$(x))) | %
+       @$(am__ensure_target_dir_exists)
+       @touch $@
+all-am: all-local %ALL-DEPS%
+all: $(if $(SUBDIRS),all-recursive,all-am)
diff --git a/lib/am/ b/lib/am/
index cc3d25d..225c566 100644
--- a/lib/am/
+++ b/lib/am/
@@ -29,10 +29,4 @@ check-am: all-am
        $(if %CHECK-DEPS%,$(MAKE) %CHECK-DEPS%,@:)
        $(MAKE) %CHECK-TESTS% check-local
-# Handle recursion.  We have to honor BUILT_SOURCES like for 'all:'.
-check: $(BUILT_SOURCES)
-       $(MAKE) $(if $(SUBDIRS),check-recursive,check-am)
 check: $(if $(SUBDIRS),check-recursive,check-am)
diff --git a/lib/am/ b/lib/am/
index 80af8a1..1972905 100644
--- a/lib/am/
+++ b/lib/am/
@@ -56,12 +56,7 @@ install-data: install-data-am
 uninstall: uninstall-am
-install: $(BUILT_SOURCES)
-       $(MAKE) $(if $(SUBDIRS),install-recursive,install-am)
 install: $(if $(SUBDIRS),install-recursive,install-am)
 .PHONY: install-am
 install-am: all-am
diff --git a/t/ b/t/
index 7c03771..cc162bb 100755
--- a/t/
+++ b/t/
@@ -42,11 +42,12 @@ libfoo_a_SOURCES = foo.c
        echo \#define FOO_DEFINE 1 >$@
 cat > lib/foo.c << 'END'
 #include <foo.h>
-int foo () { return !FOO_DEFINE; }
+int foo (void) { return !FOO_DEFINE; }
@@ -56,5 +57,6 @@ $AUTOMAKE --copy --add-missing
+$MAKE distcheck
diff --git a/t/ b/t/
index ec94af5..5cbe96f 100755
--- a/t/
+++ b/t/
@@ -41,7 +41,8 @@ if REPLACE_STDIO_H
 stdio.h: $(top_builddir)/config.status
        cp $(srcdir)/ $@
-stdio.h: $(top_builddir)/config.status
+.PHONY: stdio.h
        rm -f $@
diff --git a/t/ b/t/
index aced454..c3bc522 100755
--- a/t/
+++ b/t/
@@ -26,7 +26,7 @@ END
 cat > << 'END'
 noinst_PROGRAMS = zardoz
-nodist_zardoz_SOURCES = foo.c
+nodist_zardoz_SOURCES = foo.c bar.h
diff --git a/t/ b/t/
index d522b8c..e02ae39 100755
--- a/t/
+++ b/t/
@@ -101,53 +101,9 @@ $MAKE
 headers='parse1.h p2-parse2.h parse3.h parse4.h'
-# Check that we remake only the necessary headers.
-rm -f $headers
-$MAKE parse1.h
-test -f parse1.h
-test ! -e p2-parse2.h
-test ! -e parse3.h
-test ! -e parse4.h
-rm -f $headers
-$MAKE p2-parse2.h
-test ! -e parse1.h
-test -f p2-parse2.h
-test ! -e parse3.h
-test ! -e parse4.h
-rm -f $headers
-$MAKE parse3.h
-test ! -e parse1.h
-test ! -e p2-parse2.h
-test -f parse3.h
-test ! -e parse4.h
-# Since we declared parse3.h into $(p3_SOURCES), make should be
-# able to rebuild it automatically before remaking 'p3'.
-rm -f $headers
-$MAKE clean-p3
-test ! -e parse3.h # Sanity check.
-$MAKE build-p3
-test -f parse3.h
-rm -f $headers
-$MAKE parse4.h
-test ! -e parse1.h
-test ! -e p2-parse2.h
-test ! -e parse3.h
-test -f parse4.h
-# Now remake all the headers together.
 rm -f $headers
 $MAKE $headers
-test -f parse1.h
-test -f p2-parse2.h
-test -f parse3.h
-test -f parse4.h
+for h in $headers; do test -f $h; done
 # Most headers should be remade by "make all".
@@ -156,8 +112,9 @@ $MAKE all
 test -f parse1.h
 test -f p2-parse2.h
 test -f parse3.h
-# parse4.h is not declared in any *_SOURCES variable, nor #included
-# by any C source file, so it shouldn't be rebuilt by "make all".
+# parse4.h is not declared in any *_SOURCES variable, nor in
+# BUILT_SOURCES, nor #included by any C source file, so it
+# shouldn't be rebuilt by "make all".
 test ! -e parse4.h
diff --git a/t/ b/t/
index b688992..eb4b305 100755
--- a/t/
+++ b/t/
@@ -181,13 +181,10 @@ for try in 0 1; do
   # Minimal checks about recovering from header removal.
   rm -f p.h parse.hh parse3.hxx
-  $run_make p.h parse.hh
+  $run_make
   test -f p.h
   test -f parse.hh
-  test ! -e parse3.hxx
-  $run_make
-  $debug_info
   test -f parse3.hxx
   cd $srcdir

GNU Automake

reply via email to

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