Re: Adding targets in a python for-loop?
Bram Moolenaar <[email protected]> Sun, 23 May 2004 12:56:17 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
Magnus Therning wrote:
> I have briefly looked at A-A-P in an effort to compare it with SCons[1],
> which I have used for quite a while. There is one thing in A-A-P that I
> can't figure out how to do--adding targets in a python for-loop.
>
> In SCons I would do something like this:
>
> for s in sources:
> env.Program(source =3D s)
>
> Can I achieve the same in A-A-P?
If "sources" is a list of names, then this should work:
:program myprog : `sources`
If you actually have a more complicated loop, then adding the names to
a variable and using that is a simple solution:
Sources =
@for s in complicated():
@if condition:
Sources += $s
:program myprog : $Sources
Note the use of an Aap += assignment, it inserts a space where
necessary.
--
(letter from Mark to Mike, about the film's probable certificate)
For an 'A' we would have to: Lose as many shits as possible; Take Jesus
Christ out, if possible; Loose "I fart in your general direction"; Lose
"the oral sex"; Lose "oh, fuck off"; Lose "We make castanets out of your
testicles"
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// 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: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click