[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wed, 9 Jan 2008 13:20:24 -0800 (PST)
I am trying to formulate a rule for the following task:
The target "fileA" is created by executing the command
"Cmd_to_create_fileA", which does NOT require the "fileB". There is no rule
in GnuMake to create "fileB". Still, I would like to make the creation of
"fileA" dependent on "fileB", according to the conditons:
1) if fileA exists and fileB exists and fileB is younger than fileA;
2) if fileA exists and fileB does not exist;
3) if fileA does not exist and fileB exists;
4) if fileA does not exist and fileB does not exist;
or, formulated the other way round, do NOT execute "Cmd_to_create_fileA":
if fileA exists and fileB exists and fileB is older than fileA;
The conditions 1) and 3) are covered by the standard rule:
In cases 2) and 4) gnumake doesn't find a rule to create fileB, and aborts
with an error like "Don't now how to make fileB". How can I formulate the
rule, so no error occurs?
Can somebody please help me?
View this message in context:
Sent from the Gnu - Make - W32 mailing list archive at Nabble.com.
- Rule formulation,