diff options
author | Boris Kolpackov <boris@kolpackov.net> | 2005-02-27 21:40:23 +0000 |
---|---|---|
committer | Boris Kolpackov <boris@kolpackov.net> | 2005-02-27 21:40:23 +0000 |
commit | 659fc6b55e28740c74d66dbe3bda765d1004a12e (patch) | |
tree | a3b99015012abca13c0f7729274dff1bba322f1f /tests/scripts/features/se_explicit | |
parent | 9d153cc1b1e467cd6245755c32f78efbd62142c2 (diff) | |
download | gunmake-659fc6b55e28740c74d66dbe3bda765d1004a12e.tar.gz |
Implementation of the second expansion in explicit
rules, static pattern rules and implicit rules.
Diffstat (limited to 'tests/scripts/features/se_explicit')
-rw-r--r-- | tests/scripts/features/se_explicit | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/tests/scripts/features/se_explicit b/tests/scripts/features/se_explicit new file mode 100644 index 0000000..0e696be --- /dev/null +++ b/tests/scripts/features/se_explicit @@ -0,0 +1,105 @@ +# -*-perl-*- +$description = "Test second expansion in ordinary rules."; + +$details = ""; + +# Test #1: automatic variables. +# +run_make_test(' +.DEFAULT: ; @echo $@ + +foo: bar baz + +foo: biz | buz + +foo: $$@.1 \ + $$<.2 \ + $$(addsuffix .3,$$^) \ + $$(addsuffix .4,$$+) \ + $$|.5 \ + $$*.6 + +', +'', +'bar +baz +biz +buz +foo.1 +bar.2 +bar.3 +baz.3 +biz.3 +bar.4 +baz.4 +biz.4 +buz.5 +.6 +'); + + +# Test #2: target/pattern -specific variables. +# +run_make_test(' +.DEFAULT: ; @echo $@ + +foo.x: $$a $$b + +foo.x: a := bar + +%.x: b := baz + +', +'', +'bar +baz +'); + + +# Test #3: order of prerequisites. +# +run_make_test(' +.DEFAULT: ; @echo $@ + +all: foo bar baz + +# Subtest #1 +# +foo: foo.1; @: + +foo: foo.2 + +foo: foo.3 + + +# Subtest #2 +# +bar: bar.2 + +bar: bar.1; @: + +bar: bar.3 + + +# Subtest #3 +# +baz: baz.1 + +baz: baz.2 + +baz: ; @: + +', +'', +'foo.1 +foo.2 +foo.3 +bar.1 +bar.2 +bar.3 +baz.1 +baz.2 +'); + +# This tells the test driver that the perl test script executed properly. +1; |