Make second expansion optional (partial implementation).
commit0af33acad9e2fe61b3a92895008131cc2990b65d
authorpsmith <psmith>
Mon, 24 Oct 2005 13:01:39 +0000 (24 13:01 +0000)
committerpsmith <psmith>
Mon, 24 Oct 2005 13:01:39 +0000 (24 13:01 +0000)
treeed2b0e66c79d0543d4139aabc81e412f51e36ae2
parent7f3dcb9286af44e360a3b4289ef628260b2d7c71
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.
20 files changed:
ChangeLog
NEWS
dep.h
doc/make.texi
file.c
filedef.h
implicit.c
main.c
make.h
misc.c
read.c
rule.c
tests/ChangeLog
tests/run_make_tests.pl
tests/scripts/features/order_only
tests/scripts/features/se_explicit
tests/scripts/features/se_statpat
tests/scripts/features/statipattrules
tests/scripts/misc/general4
tests/scripts/variables/automatic