Re: Setting {installdir} on header files?

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

> I'm trying to do this in a recipe: install header files with either
> {keepdir} or {installdir} attributes set (since they need to go in
> $PREFIX/include/ kpilot). This is the basis of my recipe:
> 
> kpilotinclude_HEADERS = kpilotlink.h
>         uiDialog.h
>         plugin.h
>         syncAction.h
> 
> _top.INSTALL_INCLUDE +=  $kpilotinclude_HEADERS
> 
> 
> ok, so how to go about setting {installdir} ? If I do
> 
> 
> _top.INSTALL_INCLUDE +=  $kpilotinclude_HEADERS { installdir=kpilot }
> 
> then only the last header file in the list gets the {installdir}
> attribute.

The idea for this was that parenthesis could be used to group items and
appy attributes to all of them.  But this still hasn't been implemented
yet.  It won't be that easy, because the parenthesis must be removed in
many situations.

> If I do:
> 
> :attr $kpilotinclude_HEADERS { installdir=kpilot }
> 
> then none of the files gets installdir (at least, not when
> installing). I seem to remember this working with some previous CVS
> version, perhaps something has changed?

The attributes are added to the nodes of the items.  Since the install
code uses the variable itself and not the nodes it won't use the
attributes you added to the nodes.  I'm not sure if this should be
changed...

Anyway, this should work:

	_top.INSTALL_INCLUDE +=  $*kpilotinclude_HEADERS { installdir=kpilot }

The $* has the effect that what follows is appended to each item.

-- 
From "know your smileys":
 +<(:-) The Pope

 /// 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:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
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.