[Cook] Multiple cook files in a project
Aryeh Friedman
aryeh.friedman at gmail.com
Tue Sep 20 11:29:28 EST 2011
by definition all targets and vars are global (except the [@#]'s ones in
functions) therefor there is no way to hide something in one include from an
other one
On Mon, Sep 19, 2011 at 9:17 PM, Kyle Loveless <kyle.p.loveless at gmail.com>wrote:
> Ok. So basically there would be one master cook file that #include's
> each cook file (or #include-cooked's everything? I didn't understand
> the difference from the documentation).
>
> Thus whenever you run cook, the whole dependency graph is read in
> every time, but it just builds the part you need.
>
> Jerry, can you further explain your use of SubSystems. Are you
> exposing information in the names of your cookbooks?
>
> And just to make sure I didn't miss anything - to avoid clobbering any
> other variables/targets, all variables/targets in included cookbooks
> should be pre-pended with their path right?
>
> Thanks,
>
> Kyle
>
> On Fri, Sep 16, 2011 at 10:37 AM, Pendergraft, Jerry
> <JPendergraft at sjm.com> wrote:
> > I also use cook include files with great success. For example my top
> level project cook file contains:
> > /* Now include all Sub system COOK FILES */
> > SubCooks = [ match_mask %0%/%1.cook [project_files] ];
> > SubSystems = [ fromto %0%/%1.cook %1 [SubCooks] ];
> >
> > #include-cooked [SubCooks]
> >
> > I use the SubSystems variable to "register" whatever that subsystem wants
> to build (libs etc).
> > The benefit is that adding a new subsystem simply requires adding its
> cook file which defines what it can do.
> >
> > Note also that, as Peter says, you always type cook at the top level.
> > But if your targets are defined correctly you can always specify just one
> from the top level.
> > That is you could type:
> > $ cook libz
> > at the top, and cook would build only the libz product.
> >
> > On 16 Sep, 2011, at 01:32 , Peter Miller wrote:
> >
> >> On Fri, 2011-09-16 at 00:39 -0400, Kyle Loveless wrote:
> >>
> >>> Any more thoughts on how to solve these issues? Perhaps I'm trying to
> use
> >>> cook in an unexpected way.
> >>
> >> I use cook include files. The file names in the recipes are all
> >> relative to the top-level directory. I always type cook from the
> >> top-level directory, never a sub-directory. Also, cook_bom(1) can help.
> >>
> >> --
> >> Peter Miller <peter.miller.aus at gmail.com>
> >> _______________________________________________
> >> Cook-users mailing list
> >> Cook-users at lists.auug.org.au
> >> http://lists.auug.org.au/listinfo/cook-users
> >
> >
> > This communication, including any attachments, may contain information
> that is proprietary, privileged, confidential or legally exempt from
> disclosure. If you are not a named addressee, you are hereby notified that
> you are not authorized to read, print, retain a copy of or disseminate any
> portion of this communication without the consent of the sender and that
> doing so may be unlawful. If you have received this communication in error,
> please immediately notify the sender via return e-mail and delete it from
> your system.
> > _______________________________________________
> > Cook-users mailing list
> > Cook-users at lists.auug.org.au
> > http://lists.auug.org.au/listinfo/cook-users
> >
> _______________________________________________
> Cook-users mailing list
> Cook-users at lists.auug.org.au
> http://lists.auug.org.au/listinfo/cook-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.auug.org.au/pipermail/cook-users/attachments/20110919/1adb778e/attachment.html>
More information about the Cook-users
mailing list