On Tue, 2010-08-31 at 11:28 +0430, ali hagigat wrote: > Secondary Expansion of Explicit Rules > .SECONDEXPANSION: > foo: foo.1 bar.1 $$< $$^ $$+ # line #1 > foo: foo.2 bar.2 $$< $$^ $$+ # line #2 > foo: foo.3 bar.3 $$< $$^ $$+ # line #3 > In the first prerequisite list, all three variables ($$<, $$^, and $$+) > expand to the empty > string. In the second, they will have values foo.1, foo.1 bar.1, and > foo.1 bar.1 respec- > tively. In the third they will have values foo.1, foo.1 bar.1 foo.2 > bar.2, and foo.1 > bar.1 foo.2 bar.2 respectively. > ------------------------------------------------------------------------------------------------------------------------ > In page 21 of the make manual, there is an example of secondary > expansion. The written result of the third $$+ seems wrong. It should > be: > foo.1 bar.1 foo.2 bar.2 foo.1 foo.1 bar.1 foo.1 bar.1 > Please correct me if I am wrong.
I'm not sure what you're looking at; maybe an older version of the manual where this is incorrect? But the current version of the manual says: http://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html#index-explicit-rules_002c-secondary-expansion-of-118 In the first prerequisite list, all three variables ($$<, $$^, and $$+) expand to the empty string. In the second, they will have values foo.1, foo.1 bar.1, and foo.1 bar.1 respectively. In the third they will have values foo.1, foo.1 bar.1 foo.2 bar.2, and foo.1 bar.1 foo.2 bar.2 foo.1 foo.1 bar.1 foo.1 bar.1 respectively. which I believe is correct. -- ------------------------------------------------------------------------------- Paul D. Smith <[email protected]> Find some GNU make tips at: http://www.gnu.org http://make.mad-scientist.net "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
