help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How does make compare the timestamp if the file does not exist


From: 雷 高
Subject: How does make compare the timestamp if the file does not exist
Date: Tue, 14 Jul 2009 10:51:42 +0800 (CST)

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!


好玩贺卡等你发,邮箱贺卡全新上线!
reply via email to

[Prev in Thread] Current Thread [Next in Thread]