Re: targets in :child recipes
Bram Moolenaar <[email protected]>
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
Tim Hemel wrote:
> I tried a different approach for the problem that I sketched in an
> earlier mail today. I now do the following:
>
> main.aap:
> -----------------------------------------------------------
> Modules = etc base kernel rcfiles
> @for d in expand2list(Modules):
> :child $d/main.aap
>
> ROOTFS = rootfs
>
> image: $ROOTFS
> :pass
>
> $ROOTFS: inst-kernel
> :pass
> -----------------------------------------------------------
>
> kernel/main.aap:
> -----------------------------------------------------------
> BUILD=`var_abspath("build")`
>
> _top.KERNEL=$BUILD/bsd
> KERNCONF=`var_abspath("NET4501")`
> KERNSRC=/usr/src/sys
>
> $_top.KERNEL: $KERNCONF
> :sys config -b $BUILD -s $KERNSRC $KERNCONF
> :cd $BUILD
> :sys make clean && make depend && make
>
> inst-kernel: $_top.KERNEL
> :print Install kernel to $_top.ROOTFS
> -----------------------------------------------------------
>
> For some reason however, the inst-kernel target is not seen:
>
> buma# aap image
> Aap: Do not know how to build "inst-kernel"
>
> It is defined in a child recipe however. Should I refer to targets in a
> child recipe by a different name, or could this be a bug?
You already found a solution (adding {virtual}), but here is an
explanation: The toplevel recipe wants to build "inst-kernel" and you
define an "inst-kernel" target in the child kernel/main.aap. Since the
items in a child recipe are relative to that recipe, you actually define
the target "kernel/inst-kernel", viewed from the toplevel recipe.
--
From "know your smileys":
*<|:-) Santa Claus (Ho Ho Ho)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click