Re: Scope problem
Bram Moolenaar <[email protected]> Sat, 24 Apr 2004 23:20:43 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
Lars Ivar Igesund wrote:
> Ok, heres an example with only the relevant stuff:
>
> main.aap
> --------------
> :child foo1.aap
> :child foo2.aap
>
>
> foo1.aap
> --------------
> gtkdir {virtual} :
> GTK_BIN = "dir coming from file_path()"
>
> gtklib : gtkdir
> _top.GTK_LIBS = GTK_BIN
>
> all : gtklib
>
>
> foo2.aap
> ---------------
> LIBS = $_top.GTK_LIBS
>
>
> Now execute the main recipe to get an error from foo2
$_top.GTK_LIBS will be defined when the "gtklib" target is updated.
That hasn't happened yet when foo2.aap is read.
Aap reads all the recipes before it starts updating the first target.
You would have to use:
:child foo1.aap
:update gtklib
:child foo2.aap
But that still won't work when gtklib is up-to-date.
--
Shift happens.
-- Doppler
/// 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