make-w32
[Top][All Lists]
Advanced

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

Re: Rule formulation


From: haues 1
Subject: Re: Rule formulation
Date: Fri, 11 Jan 2008 14:26:01 -0800 (PST)

I am glad it is that easy. Thanks a lot!

-haues-


Rob Walker-6 wrote:
> 
> Just add an empty rule for fileB, like so:
> 
> fileB:
> 
> -Rob
> 
> haues1 wrote:
>> Hi,
>>
>> 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:
>>
>> Execute "Cmd_to_create_fileA"
>>      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:
>>
>>      fileA: fileB
>>             Cmd_to_create_fileA
>>
>> 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?
>>
>> Cheers
>> Haues
>>   
> 
> 
> 
> _______________________________________________
> Make-w32 mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/make-w32
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Rule-formulation-tp14721900p14766474.html
Sent from the Gnu - Make - W32 mailing list archive at Nabble.com.





reply via email to

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