diff options
author | Paul Smith <psmith@gnu.org> | 2009-09-24 02:41:44 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2009-09-24 02:41:44 +0000 |
commit | 0afbbf8595b6035a5a930399d20320d2e2852d72 (patch) | |
tree | 6c74d485e4d57b2bf41bb5d6afaac1b4569dd554 /tests/scripts/features/se_statpat | |
parent | 3cc351decdd7d53fea0c730fd919163f20706762 (diff) | |
download | gunmake-0afbbf8595b6035a5a930399d20320d2e2852d72.tar.gz |
- Rework secondary expansion so we only defer it if there's a possibility
it might be needed: for most situations we parse prereqs immediately as
we used to. Reduces memory usage.
- Fixes Savannah bug #18622.
Diffstat (limited to 'tests/scripts/features/se_statpat')
-rw-r--r-- | tests/scripts/features/se_statpat | 55 |
1 files changed, 17 insertions, 38 deletions
diff --git a/tests/scripts/features/se_statpat b/tests/scripts/features/se_statpat index 096b240..b1e59e1 100644 --- a/tests/scripts/features/se_statpat +++ b/tests/scripts/features/se_statpat @@ -5,12 +5,11 @@ $details = ""; # Test #1: automatic variables. # -run_make_test(' +run_make_test(q! .SECONDEXPANSION: -.DEFAULT: ; @echo $@ +.DEFAULT: ; @echo '$@' foo.a foo.b: foo.%: bar.% baz.% - foo.a foo.b: foo.%: biz.% | buz.% foo.a foo.b: foo.%: $$@.1 \ @@ -19,10 +18,8 @@ foo.a foo.b: foo.%: $$@.1 \ $$(addsuffix .4,$$+) \ $$|.5 \ $$*.6 - -', -'', -'bar.a +!, + '', 'bar.a baz.a biz.a buz.a @@ -41,61 +38,45 @@ a.6 # Test #2: target/pattern -specific variables. # -run_make_test(' +run_make_test(q! .SECONDEXPANSION: -.DEFAULT: ; @echo $@ +.DEFAULT: ; @echo '$@' foo.x foo.y: foo.%: $$(%_a) $$($$*_b) foo.x: x_a := bar %.x: x_b := baz - - -', -'', -'bar -baz -'); +!, + '', "bar\nbaz\n"); # Test #3: order of prerequisites. # -run_make_test(' +run_make_test(q! .SECONDEXPANSION: -.DEFAULT: ; @echo $@ +.DEFAULT: ; @echo '$@' all: foo.a bar.a baz.a # Subtest #1 -# foo.a foo.b: foo.%: foo.%.1; @: - foo.a foo.b: foo.%: foo.%.2 - foo.a foo.b: foo.%: foo.%.3 # Subtest #2 -# bar.a bar.b: bar.%: bar.%.2 - bar.a bar.b: bar.%: bar.%.1; @: - bar.a bar.b: bar.%: bar.%.3 # Subtest #3 -# baz.a baz.b: baz.%: baz.%.1 - baz.a baz.b: baz.%: baz.%.2 - baz.a baz.b: ; @: - -', -'', -'foo.a.1 +!, + '', 'foo.a.1 foo.a.2 foo.a.3 bar.a.1 @@ -108,17 +89,15 @@ baz.a.2 # Test #4: Make sure stem triple-expansion does not happen. # -run_make_test(' +run_make_test(q! .SECONDEXPANSION: foo$$bar: f%r: % $$*.1 - @echo \'$*\' + @echo '$*' oo$$ba oo$$ba.1: - @echo \'$@\' - -', -'', -'oo$ba + @echo '$@' +!, + '', 'oo$ba oo$ba.1 oo$ba '); |