Re: Converting from Imake!
Bram Moolenaar <[email protected]> Wed, 27 Apr 2005 12:08:41 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
Joey -
> > And then use an "if" command:
> >
> > @if _no.METHOD == 'static':
> > EXT = .a
> > @else:
> > EXT = .obj
> >
> > all: libant/libant$EXT libPromote/libPromote$EXT
>
> This wouldn't handle the case where I would like both built. Although
> I suppose, I could put a conditional in my toplevel main.aap, but I
> would still have to define the all targets multiple times.
>
> @if _no.STATIC==1
> all: libant/libant.a libPromote/libPromote.a
> @if _no.SHARED==1
> all: libant/libant.so libPromote/libPromote.so
>
> That seems kind of kludgy to me, though. Adding/removing
> directories/libraries would be kind of a pain...
Yes, you probably should use virtual targets instead.
> > "In the right order" means there are dependencies. You should tell Aap
> > about them, then it will be taken care off automatically.
>
> True, there are dependencies, but can you define a library being
> successfully built and moved over as a dependency?
Yes. Please forget about the old make method of doing things in the
right order. Like SCons, Aap wants all dependencies to be specified
explicitly, instead of implicitly by ordering them. This requires
letting go of some old habits.
> > It makes sense. You appear to want something like a "global virtual
> > target", thus one that may appear in every child script. So that the
> > toplevel recipe doesn't need to know about targets in the children.
>
> That's exactly right! This isn't possible, is it?
I don't think this currently works. I haven't tried it or looked at the
code (and now I'm going on a holiday, not time...).
> I have a SDDAS.aap which I include in all my subdir main.aap files
> (:include ../SDDAS.aap) where I tried defining a global virtual target
> which I called "release". It seemed like a good idea; however, it said
> "Multiple build commands for target "release"" which is a true
> statement, sort of. The release command is different for each subdir,
> but similar in nature. I'm not sure why this fails since "install" is
> in every subdir and that's okay.
There is a list of targets that are global. What you want is adding
targets to this list.
--
"Never be afraid to tell the world who you are."
-- Anonymous
/// 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 LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix