diff options
author | Paul Smith <psmith@gnu.org> | 2005-10-24 13:01:39 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2005-10-24 13:01:39 +0000 |
commit | 11095a90f120545c915c92b8ebf48f04723d1837 (patch) | |
tree | 73dba88903ea90cdac930057fe8619a8a04fb869 /tests/scripts/variables | |
parent | 66459baee27374577d32a78564604ad64228f71d (diff) | |
download | gunmake-11095a90f120545c915c92b8ebf48f04723d1837.tar.gz |
Make second expansion optional (partial implementation).
I decided this feature was too impacting to make the permanent default
behavior. This set of changes makes the default behavior of make the
old behavior (no second expansion). If you want second expansion, you
must define the .SECONDEXPANSION: special target before the first target
that needs it.
This set of changes ONLY fixes explicit and static pattern rules to work
like this. Implicit rules still have second expansion enabled all the
time: I'll work on that next.
Note that there is still a backward-incompatibility: now to get the old
SysV behavior using $$@ etc. in the prerequisites list you need to set
.SECONDEXPANSION: as well.
Diffstat (limited to 'tests/scripts/variables')
-rw-r--r-- | tests/scripts/variables/automatic | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/scripts/variables/automatic b/tests/scripts/variables/automatic index 484cd16..dc08bd7 100644 --- a/tests/scripts/variables/automatic +++ b/tests/scripts/variables/automatic @@ -27,7 +27,7 @@ $(dir)/bar.y baz.z : ; touch $@ EOF close(MAKEFILE); -# TEST #1 -- simple test +# TEST #0 -- simple test # ------- # Touch these into the past @@ -46,7 +46,7 @@ touch $dir/foo.x\n"; unlink(qw(foo.x bar.y baz.z)); -# TEST #2 -- test the SysV emulation of $$@ etc. +# TEST #1 -- test the SysV emulation of $$@ etc. # ------- $makefile2 = &get_tmpfile; @@ -54,6 +54,7 @@ $makefile2 = &get_tmpfile; open(MAKEFILE, "> $makefile2"); print MAKEFILE "dir = $dir\n"; print MAKEFILE <<'EOF'; +.SECONDEXPANSION: .SUFFIXES: .DEFAULT: ; @echo '$@' @@ -78,7 +79,7 @@ $answer = ".x\n$dir/x.z.x\nx\n\$@.x\n$dir.x\nx.z.x\n.y\n$dir/y.z.y\n\y\n\$@.y\n$ $answer = "$dir/biz.x\n$dir.x\nbiz.x\n"; &compare_output($answer, &get_logfile(1)); -# TEST #3 -- test for Savannah bug #12320. +# TEST #2 -- test for Savannah bug #12320. # run_make_test(' .SUFFIXES: .b .src |