help-make
[Top][All Lists]
Advanced

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

Re: Setting target execution order


From: Matt Perry
Subject: Re: Setting target execution order
Date: Mon, 24 Nov 2003 19:39:57 -0800 (PST)

On Mon, 24 Nov 2003, Noel Yap wrote:

> Can you supply a /really/ stripped down version and provide explanations
> as to why creating prereq's for the target "gzip" won't work in your
> situation?

Sorry about the previous makefile.  Here's a better one:

a:
        touch a

b:
        touch b

all: a b

gzip:
        -gzip a
        -gzip b

What I want to do is optionally add 'gzip' at the end of my target list.  
gzip can't have any prerequisites because I might only want to build a, or
only build b.  I was just hoping to have some error checking so that if
gzip was present and wasn't the last target, it could be moved to the last 
target.  I tried manipulating MAKECMDGOALS but it appears that variable is 
for reference only.  Is there a way to change the order of the goals from 
within the makefile or am I best off just exiting with a warning if the 
targets aren't in the order I need?

-- 
Matt Perry | matt at primefactor dot com





reply via email to

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