automake-commit
[Top][All Lists]
Advanced

[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-298-g87fd28f
Date: Sat, 02 Jun 2012 19:44: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=87fd28feafa58a98fa2fdc139de803aa191abb30

The branch, ng/master has been updated
       via  87fd28feafa58a98fa2fdc139de803aa191abb30 (commit)
       via  9dea4346c710904599d62d3b15df191b9d533866 (commit)
       via  a09d8f50b3ba671c5366b46edf7f48192a936c99 (commit)
       via  8ecea0b45b661a1178e7585a36e6a36381cfd4ad (commit)
      from  ebdce60d0f785d276288057858499368b03d8561 (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 87fd28feafa58a98fa2fdc139de803aa191abb30
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jun 2 21:11:38 2012 +0200

    [ng] refactor: a first use of "ifndef VAR"
    
    * lib/am/header-vars.am: Use "ifndef .FEATURES" instead of
    "$(if $(.FEATURES))" to determine whether the used GNU make
    version is recent enough.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 9dea4346c710904599d62d3b15df191b9d533866
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jun 2 20:52:26 2012 +0200

    [ng] internals: new variable $(am__newline)
    
    * lib/am/header-vars.am (am__newline): New, contains one single newline.
    * t/internals.tap: Test it.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit a09d8f50b3ba671c5366b46edf7f48192a936c99
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jun 2 17:59:19 2012 +0200

    [ng] internals: copy 'header-vars.am' more verbatim in the output makefile
    
    * automake.in (define_standard_variables): The 'header-vars.am' file should
    contain no rule definition, nor any variable definition that must be known
    at automake runtime; so we can read and process that file's content using
    the 'preprocess_file' function rather than the 'file_contents_internal' one.
    This will allow us to make a more liberal use of GNU make builtins in there,
    like the 'define' builtin.
    * t/comment4.sh: Adjust.
    * t/vpath.sh: Likewise.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 8ecea0b45b661a1178e7585a36e6a36381cfd4ad
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jun 2 17:44:02 2012 +0200

    [ng] tests: remove redundant code in a test case
    
    * t/internals.tap (Makefile.am): Remove extra declaration of the
    'test-tolower' target.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 automake.in           |    8 +-------
 lib/am/header-vars.am |   10 ++++++++--
 t/comment4.sh         |   13 ++++++++-----
 t/internals.tap       |   13 +++++++++----
 t/vpath.sh            |   20 +++++++++++++++++---
 5 files changed, 43 insertions(+), 21 deletions(-)

diff --git a/automake.in b/automake.in
index 1bf6a24..0428cf9 100644
--- a/automake.in
+++ b/automake.in
@@ -6250,17 +6250,11 @@ sub read_am_file ($$)
 # and variables from header-vars.am.
 sub define_standard_variables
 {
-  my $saved_output_vars = $output_vars;
-  my ($comments, undef, $rules) =
-    file_contents_internal (1, "$libdir/am/header-vars.am",
-                           new Automake::Location);
-
   foreach my $var (sort keys %configure_vars)
     {
       &define_configure_variable ($var);
     }
-
-  $output_vars .= $comments . $rules;
+  $output_vars .= preprocess_file ("$libdir/am/header-vars.am");
 }
 
 # Read main am file.
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 9626744..9903af9 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -29,12 +29,18 @@ am__dquote := "
 am__squote := '
 # "` # Fix font-lock.
 
+define am__newline
+
+
+endef
+
 ## Makefiles generated by Automake-NG require GNU make >= 3.81.
 ## The .FEATURES special variable has been introduced in that make
 ## version, so use it as a witness to determine whether the current
 ## make is good enough.
-$(if $(.FEATURES),, \
-  $(error Automake-NG based builds require GNU make 3.81 or later))
+ifndef .FEATURES
+  $(error Automake-NG based builds require GNU make 3.81 or later)
+endif
 
 am__mkdir = test -d $1 || $(MKDIR_P) $1
 
diff --git a/t/comment4.sh b/t/comment4.sh
index 42e7bf9..616877a 100755
--- a/t/comment4.sh
+++ b/t/comment4.sh
@@ -31,9 +31,12 @@ EOF
 
 $ACLOCAL
 $AUTOMAKE
-# UnIqUe_COPYRIGHT_BOILERPLATE should appear near the top of the file
-test `sed -n -e '1,/UnIqUe_COPYRIGHT_BOILERPLATE/p' Makefile.in \
-      | wc -l` -le 30
+# UnIqUe_COPYRIGHT_BOILERPLATE shouldn't appear just before the
+# definition of 'mumble'.
+test $(sed -n -e '/UnIqUe_COPYRIGHT_BOILERPLATE/,/UnIqUe_MUMBLE_VALUE/p' \
+       Makefile.in | wc -l) -gt 50
 # UnIqUe_MUMBLE_COMMENT should appear right before the mumble declaration.
-test `sed -n -e '/UnIqUe_MUMBLE_COMMENT/,/UnIqUe_MUMBLE_VALUE/p' Makefile.in \
-      | wc -l` -eq 2
+test $(sed -n -e '/UnIqUe_MUMBLE_COMMENT/,/UnIqUe_MUMBLE_VALUE/p' \
+       Makefile.in | wc -l) -eq 2
+
+:
diff --git a/t/internals.tap b/t/internals.tap
index 669e09e..2c2fccd 100755
--- a/t/internals.tap
+++ b/t/internals.tap
@@ -19,7 +19,7 @@
 am_create_testdir=empty
 . ./defs || Exit 1
 
-plan_ 7
+plan_ 8
 
 cp "$am_amdir"/header-vars.am . \
   || fatal_ "fetching makefile fragment headers-vars.am"
@@ -112,9 +112,6 @@ test-strip-suffixes:
        test '$(call am__strip_suffixes, .b.a .a, foo.b.a bar.a)' \
              = 'foo bar'
 
-.PHONY: test-tolower
-test-tolower:
-
 .PHONY: test-toupper
 test-toupper:
        test '$(call am__toupper,a)'  = A
@@ -164,6 +161,13 @@ test-canonicalize:
        test '$(call am__canon,$(comma))' = '_'
        test '$(call am__canon,$(bslash)$(comma))' = '__'
        test '$(call am__canon,x$(comma)@$(bslash))' = 'address@hidden'
+
+.PHONY: test-newline
+test-newline:
+       @echo OK > foo$(am__newline)@touch bar$(am__newline)-false > baz
+       test `cat foo` = OK
+       test -f bar
+       test -f baz
 END
 
 command_ok_  am__strip_firstword        $MAKE test-strip-firstword
@@ -173,5 +177,6 @@ command_ok_  am__test_strip_suffixes    $MAKE 
test-strip-suffixes
 command_ok_  am__tolower                $MAKE test-tolower
 command_ok_  am__toupper                $MAKE test-toupper
 command_ok_  am__canon                  $MAKE test-canonicalize
+command_ok_  am__newline                $MAKE test-newline
 
 :
diff --git a/t/vpath.sh b/t/vpath.sh
index 4bfc9be..f20ebf8 100755
--- a/t/vpath.sh
+++ b/t/vpath.sh
@@ -19,15 +19,29 @@
 
 . ./defs || Exit 1
 
+echo AC_OUTPUT >> configure.ac
+
 cat > Makefile.am << 'END'
 VPATH = zardoz
+%.bar: %.foo
+       cp $< $@
 END
 
 $ACLOCAL
+$AUTOCONF
 $AUTOMAKE
 
-grep VPATH Makefile.in # For debugging.
-grep '^VPATH = zardoz$' Makefile.in
-grep 'address@hidden@' Makefile.in && Exit 1
+mkdir build
+cd build
+mkdir zardoz
+../configure
+
+echo OK > zardoz/file.foo
+echo KO > ../file.foo
+$MAKE file.bar
+test "$(cat file.bar)" = OK
+rm -f file.bar zardoz/file.foo
+$MAKE file.bar && Exit 1
+test ! -f file.bar
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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