%% "Robert P. J. Day" <[EMAIL PROTECTED]> writes: rpjd> $(Program): build_msg ... other targets ... rpjd> ... rpjd> .PHONY: build_msg rpjd> build_msg: rpjd> @printf blah blah
rpjd> below this snippet, it reads: rpjd> "Because the printf is in a phony target, the message is printed rpjd> immediately before any prerequisites are updated." rpjd> really? i thought there was no way to guarantee the order of rpjd> dependency processing. are phony targets special in this rpjd> respect? or is the book just wrong? If you run make without -j, then prerequisites are guaranteed to be updated in the order in which they appear. If you run make with -j, then although make will still update them in the order in which they appear, because they are run at the same time you can't tell for sure which ones the operating system will schedule first. However, the comment is definitely confusing. There's nothing special about .PHONY in this respect; it has nothing to do with the order in which things happen. I expect they're just saying that the message will always be printed, even if you have a file named build_msg. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "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
