Re: Handling build attributes

Bram Moolenaar <[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Adriaan de Groot wrote:

> Suppose (this is a hypothetical recipe - I know objecttype doesn't make much 
> sense in the places where I use it here):
> 
> :program a : { add_INCLUDE=-Ithing } 
> 	{ objecttype = frobnicated } 
> 	b.c 
> 	c.c { objecttype = discombobulate } { add_INCLUDE = -Iboo } 
> 	d.c { var_INCLUDE=-I/usr }
> 
> I had an earlier patch that applied build attributes ( {
> add_INCLUDE=-Ithing } { objecttype = frobnicated } ) to sources, but
> it did it wrong and Bram told me to use spaces around = and to put the
> attributes in the build_attr, not in the nodes. So I have, and patch
> is attached. It's somewhat larger than before, because it takes the
> following into account:

Thanks for making this.  Looks like you thought of everything.

When running the tests I encountered this problem:

	Aap: /usr/local/bin/python1.5 rectest/test005.py "/usr/local/bin/python1.5"
	Aap: Internal Error
	Aap: Traceback (innermost last):
	   File "Process.py", line 1115, in Process
	    exec script_string in recdict, recdict
	   File "<string>", line 6, in ?
	   File "Commands.py", line 342, in aap_program
	    for ba in build_attr:
	 TypeError: loop over non-sequence

This change fixes it:

-	    for ba in build_attr:
+           for ba in build_attr.keys():

But test 16 hangs...  Oh, that's a problem with the modified "d" module,
not this patch.

> Heck, it makes sense to me. Docs are forthcoming, unless thinking
> about bdir() gets in the way.

Yes, please do write the docs.  Adding a test in rectest would also be
good.

-- 
An indication you must be a manager:
You believe you never have any problems in your life, just
"issues" and "improvement opportunities".

 /// 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: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.