[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ordering targets as arguments
From: |
Iwan Aucamp |
Subject: |
Re: Ordering targets as arguments |
Date: |
Sun, 14 Nov 2010 01:10:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.11) Gecko/20101013 Lightning/1.0b2 Thunderbird/3.1.5 |
On 11/14/2010 12:58 AM, Erik Rull wrote:
Hi all,
how can I force make to "sort" targets that were given as arguments?
e.g. I want to type at prompt
make object obj=test copy_object
What should happen:
object gets executed and afterwards copy_object gets executed
Well yes - I could write a rule like
copy_object: object
[....]
In general prerequisites are the way to achieve this with make
But this would mean that object gets executed also if I did not give
it as an argument to the make command.
This can be done by using finer grained prerequisites, e.g.:
object: my_file.o
copy_object: my_file.o
this would ensure that whatever copy_object needs will be there - and
similarly that whatever object needs is there.
I don't need a general handling of the sequence of the arguments only
for this special rule I want to have it executed after all other rules
(also with -j - not parallelized with the other stuff.
Any ideas?