automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, experimental/ng/var-simplif


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, experimental/ng/var-simplify, updated. v1.12-149-gd6f0216
Date: Thu, 03 May 2012 10:38:14 +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=d6f0216ecd7689bc2080408dcb55d3df63a87466

The branch, experimental/ng/var-simplify has been updated
       via  d6f0216ecd7689bc2080408dcb55d3df63a87466 (commit)
      from  2a721d95c54194a6364d914c4a77dc20ddc13cd1 (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 d6f0216ecd7689bc2080408dcb55d3df63a87466
Author: Stefano Lattarini <address@hidden>
Date:   Thu May 3 12:36:33 2012 +0200

    tests: spy behaviour of '+=' with GNU make
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 t/{spy-pattern-rules.sh => spy-var-append.sh} |   62 +++++++++++++------------
 1 files changed, 32 insertions(+), 30 deletions(-)
 copy t/{spy-pattern-rules.sh => spy-var-append.sh} (54%)

diff --git a/t/spy-pattern-rules.sh b/t/spy-var-append.sh
similarity index 54%
copy from t/spy-pattern-rules.sh
copy to t/spy-var-append.sh
index b2bb25d..d51ea48 100755
--- a/t/spy-pattern-rules.sh
+++ b/t/spy-var-append.sh
@@ -14,41 +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/>.
 
-# Check that, if we have two pattern rules from which the same file (or
-# set of files) can be built, and both are applicable, the first one wins.
-# This is used at least in our 'parallel-tests' support.
+# GNU make allows us to append to undefined variables.
+# Also, if we override a variable definition from the command line,
 
 am_create_testdir=empty
 . ./defs || Exit 1
 
-cat > Makefile <<'END'
-default:
-
-%.foo: %
-       cp $< $@
-%.foo: %.x
-       cp $< $@
-
-%.bar: %.x
-       cp $< $@
-%.bar: %
-
-%.mu %.fu: %.1
-       cp $< $*.mu && cp $< $*.fu
-%.mu %.fu: %.2
-       cp $< $*.mu && cp $< $*.fu
+cat > Makefile << 'END'
+var0 += foo
+
+var1 += bar
+var1 += baz
+
+var2 = a
+var2 += b
+
+var3 := x
+var3 += y
+
+.PHONY: test1 test2
+test1:
+       test x'$(var0)' = x'foo'
+       test x'$(var1)' = x'bar baz'
+       test x'$(var2)' = x'a b'
+       test x'$(var3)' = x'x y'
+test2:
+       test x'$(var0)' = x'mu'
+       test x'$(var1)' = x
+       test x'$(var2)' = x'two'
+       test x'$(var3)' = x'three'
 END
 
-echo one > all
-echo two > all.x
-$MAKE all.foo all.bar
-diff all all.foo
-diff all.x all.bar
-
-echo one > x.1
-echo two > x.2
-$MAKE x.mu
-diff x.mu x.1
-diff x.fu x.1
+checkit ()
+{
+  $MAKE "$@" 2>stderr && test ! -s stderr || { cat stderr >&2; Exit 1; }
+}
+
+checkit test1
+checkit test2 var0=mu var1= var2=two var3=three
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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