help-make
[Top][All Lists]
Advanced

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

Re: Hard time figuring out what order-only prerequisites really do.


From: Angel Tsankov
Subject: Re: Hard time figuring out what order-only prerequisites really do.
Date: Fri, 1 Jul 2005 15:47:00 +0300

If this is the case, I still cannot see why it always performs the action of 
this rule (excerpt from an attachment in a previous post):

IntermediateFiles/%.o: SourceFiles/%.cpp | IntermediateFiles

gcc -c $< -o $@


> Well, when you have:
>
> target: dependency
> action
>
> GNU make will perform "action" if either "target" doesn't exist or is 
> older than "dependency".
>
> If you have:
>
> target: | dependency
> action
>
> GNU make will perform "action" only if "target" doesn't already exist.
>
> Angel Tsankov wrote:
>
>> I didn't get this. Could you give a more detaild explanation?
>>
>>
>>>In my view, all they do is change the meaning of "up to date" from the 
>>>usual "exists and timestamp is newer" to just "exists".
>>>
>>>Noel
>>>
>>>Angel Tsankov wrote:
>>>
>>>
>>>>I'm having a really hard time what order-only prerequsites really do.
>>>>
>>>>First, I thought that they will do just fine if I want to have my object 
>>>>files go in a separate folder. This makes it necessary to ensure this 
>>>>folder (let's name it IntemediateFolder) exists before compilation of 
>>>>each source file. Of course, this check should not render the target 
>>>>(object file) out-of-date. As far as I get it all this make the 
>>>>folder-existence check (and creation if necessary) appropriate for an 
>>>>order-only prerequiste. However, I must be awfully wrong, 'cause I could 
>>>>not come up with a makefile that does exactly this. And I've been trying 
>>>>it since for a whole day...
>>>>
>>>>So, I've attached the troublesome makefile. I execute it with make 3.80 
>>>>on a linux system. Could you explain to me why the script compiles the 
>>>>soruce files even when the objects do exist and are newer than the 
>>>>corresponding source files?
>>>>
>>>>Best wishes,
>>>>An unsuccessful rocket sceintist 
>>>>_______________________________________________
>>>>Help-make mailing list
>>>>address@hidden
>>>>http://lists.gnu.org/mailman/listinfo/help-make
>>>
>>
>>
>
> 






reply via email to

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