summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2005-10-24 13:01:39 +0000
committerPaul Smith <psmith@gnu.org>2005-10-24 13:01:39 +0000
commit11095a90f120545c915c92b8ebf48f04723d1837 (patch)
tree73dba88903ea90cdac930057fe8619a8a04fb869 /NEWS
parent66459baee27374577d32a78564604ad64228f71d (diff)
downloadgunmake-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 'NEWS')
-rw-r--r--NEWS24
1 files changed, 15 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index 5adb7a9..e6b3322 100644
--- a/NEWS
+++ b/NEWS
@@ -18,15 +18,21 @@ Version 3.81beta3
* WARNING: Backward-incompatibility!
GNU make now implements a generic "second expansion" feature on the
- prerequisites of both explicit and implicit (pattern) rules. After
- all rules have been parsed the prerequisites are expanded again, this
- time with all the automatic variables in scope. This means that in
- addition to using standard SysV $$@ in prerequisites lists, you can
- also use complex functions such as $$(notdir $$@) etc. This behavior
- applies to implicit rules, as well, where the second expansion occurs
- after the rule is matched. However, this means that you need to
- double-quote any "$" in your filenames; instead of "foo: boo$$bar" you
- now must write "foo: foo$$$$bar".
+ prerequisites of both explicit and implicit (pattern) rules. In order
+ to enable this feature, the special target '.SECONDEXPANSION' must be
+ defined before the first target which takes advantage of it. If this
+ feature is enabled then after all rules have been parsed the
+ prerequisites are expanded again, this time with all the automatic
+ variables in scope. This means that in addition to using standard
+ SysV $$@ in prerequisites lists, you can also use complex functions
+ such as $$(notdir $$@) etc. This behavior applies to implicit rules,
+ as well, where the second expansion occurs when the rule is matched.
+ However, this means that you need to double-quote any "$" in your
+ filenames; instead of "foo: boo$$bar" you now must write "foo:
+ foo$$$$bar". Note that the SysV $$@ etc. feature, which used to be
+ available by default, is now ONLY available when the .SECONDEXPANSION
+ target is defined. If your makefiles take advantage of this SysV
+ feature you will need to update them.
* WARNING: Backward-incompatibility!
In order to comply with POSIX, the way in which GNU make processes