Re: Not rebuilding existing files
Bram Moolenaar <[email protected]> Sat, 24 Apr 2004 14:59:12 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
Lars Ivar Igesund wrote:
> I've created a custom action that creates import libraries
> from dlls.
>
> It looks like this:
>
> :action implib lib dll
> :sys implib /noi /system $target $source
>
> and the route
>
> :route dll lib
> implib
>
> I call it by using
>
> :do implib {target = $lib} $dll
>
> Now, if I execute the recipe again, the import libraries are rebuilt
> unnecessarily. It seems like I'm unable to find out how to not rebuild
> if they already exists. Is there an easy way to add this to the code
> above? I don't think this stuff warrants an inclusion into A-A-P and
> thus I want to make as small a recipe for it as possible.
An action is always executed when you invoke it with ":do".
You probably want to use a rule or dependency for this:
:rule %.lib : %.dll
:do implib {target = $target} $source
And then use ":update my.lib" where you were using ":do implib".
You don't need the route for this. There is still a design decision to
be taken whether routes should also be used like rules, to execute
commands to update a target. Problem is that the relation between the
target and source file name may not be so obvious and we only know the
file types.
--
hundred-and-one symptoms of being an internet addict:
13. You refer to going to the bathroom as downloading.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297