[Top][All Lists]

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

Re: How to always build a target?

From: Steven Knight
Subject: Re: How to always build a target?
Date: Mon, 30 Oct 2000 14:04:44 -0600 (CST)

On Mon, 30 Oct 2000, Eric Brown wrote:
> I'm converting my project from (recursive invocations of) nmake to Cons.
> Currently, the project generates a header (containing the current date) on
> every invocation; the generating tool is smart enough to not update the file
> if it's not necessary.  How would I force the invocation of a Command script
> on every invocation?

I don't know of any way to do this right now, short of making the target
dependent on some other file that changes every time.

Invoking something every time and letting the underlying tool handle part
of the dependency analysis runs counter to Cons' design.  Cons would
have no way of knowing that your smart tool figured out that it didn't
need to update the header file.  Hence, Cons would still think the header
file had been rebuilt every time, and it would then try to rebuild every
target that depends on that header file every time, which is probably not
what you want.  You could get around this by Ignore()ing the dependency
on the header file, but then the dependent targets wouldn't get rebuilt
when you actually wanted them to...

> My current script leaves the <inputs> section of the Command empty, but the
> $> tag resolves to '0', and not '$INCLUDE/GeneratedVersion.h', as (I
> believe) it should.  I suspect the missing <inputs> section is bollixing
> things up, but I'm not sure how to go about fixing it.

Your problem here is that, in the command line spec, you're using $>
instead of %> to specify the target.  Cons construction variables are
introduced with '%', not '$'.


reply via email to

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