Re: Missing info about commands, variables and attributes

Bram Moolenaar <[email protected]> Sun, 25 Jul 2004 18:17:13 +0200
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
Magnus Therning wrote:

> After feeling a bit lost in using aap for some time I have finally
> realised one thing that is missing from the documentation. I think it
> would help me greatly in grokking how to use aap.
> 
> I would like to see info on what variables/attributes are used for each
> command in the documentation. E.g. for :program I'd like to see
> something like this:
> 
>  each C file is compiled like this:
> 
>   $(CC) $(CFLAGS) -o $(target) $(INCLUDE) $(source)
> 
>  each C++ file is compiled like this:
> 
>   $(CXX) $(CXXFLAGS) -o $(target) $(INCLUDE) $(source)
>
>  and the final executable is linked with:
> 
>   $(CC) -o $(target) $(add_LIBS) $(LIBS) $(source)
>  or if there was at least one C++ file among the sources with:
>   $(CXX) -o $(target) $(add_LIBS) $(LIBS) $(source)

Unfortunately, this is not true.  It depends on what tools you are
using.  For compiling with MSVC a different command is used.

Flexibility has its price....

> I'd also like to have it clearly marked what is a variable and what is
> an attribute (and in the case of attributes: an attribute of what).

Attributes are used for items (file names) and for commands.  A variable
is a string of characters, it can have items (file names) and
attributes.

> P.S.
> I found it very confusing that the following didn't do what I expected:
> 
>  :program { INCLUDE = -I../foo } bar : main.c
> 
> instead I needed to do this:
> 
>  INCLUDE = -I../foo
>  :program bar : main.c
> 
> and $(INCLUDE) would then be used for _all_ compilations of C files
> (which wasn't what I wanted).

Did you try to use any of these:

  :program bar { INCLUDE = -I../foo } : main.c
  :program bar : { INCLUDE = -I../foo } main.c
  :program bar : main.c { INCLUDE = -I../foo }

Generally, an attribute comes after the item it applies to.  It's not
always obvious where to put it in a command (unfortunately).

-- 
hundred-and-one symptoms of being an internet addict:
87. Everyone you know asks why your phone line is always busy ...and
    you tell them to send an e-mail.

 /// 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 BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click