When make detects the target does not exist and runs the
associated rules, it also runs any rules which use the
new target as a prerequisite.

In this example, any execution of make will *always* run
the rule for "boo" (unless it is created outside make),
and therefore always run the rule for "foo" also.

Hope this helps,

Stephen Macmanus


雷 高 wrote:
If the target of a rule does not exist or the timestamp of the target is older than any of the prerequisites, the target is out of date. My question is that if some files of prerequisites does not exist, how can we compare the timestamp.
For example:
foo : boo
        @echo foo
boo :
        @echo boo
Then if foo already exists, but the rule for "boo" does not create the file boo, so how compare the timestamp of foo and boo.
When I run the makefile, the console prints :
boo
foo
I want to know why the make parses the makefile like this.

A more general problem is that how the make treat files which doesn't exist and can't be created by explicit rules and implicit rules.

Thank you for your answer!


------------------------------------------------------------------------
好玩贺卡等你发,邮箱贺卡全新上线! <http://cn.rd.yahoo.com/mail_cn/tagline/card/*http://card.mail.cn.yahoo.com/>


------------------------------------------------------------------------

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to