Re: How to expand environment variable in compilation command?

Ilja Honkonen <[email protected]>
Newsgroups gmane.comp.file-systems.zero-install.devel
Message-ID <[email protected]>
> Most likely, using "shell-command" will override it. Try using some
> <arg> elements instead. The literal expansion is:
>     <runner interface='http://repo.roscidus.com/utils/bash'>
>       <arg>-c</arg>
>       <arg>"$$@"</arg>
>       <arg>-</arg>
>     </runner>
>     <arg>c++</arg>
>     <arg>${SRCDIR}/test.cpp</arg>
>     ...

for-each still seems to be ignored:

...
     <command name = 'compile'>
       <runner interface = '../lfs/bash/bash.xml'>
       <!--runner interface = 'http://repo.roscidus.com/utils/bash'-->
         <arg>-c</arg>
         <arg>"$$@"</arg>
         <arg>-</arg>
       </runner>
       <arg>c++</arg>
       <arg>${SRCDIR}/test.cpp</arg>
       <arg>-o</arg>
       <arg>$DISTDIR/test</arg>
       <for-each item-from = 'CPPFLAGS'><arg>-I ${item}</arg></for-each>
       <compile:implementation arch = '*-*'>
         <command name = 'test' path = 'test'></command>
         <command name = 'run' path = 'test'></command>
       </compile:implementation>
     </command>
     <requires interface = '../boost/boost.xml'>
       <environment name = 'CPPFLAGS' insert = 'include' mode = 'append'>
       </environment>
     </requires>
...

No dependencies need compiling... compile test itself...
WARNING:root:Error setting locale (eg. Invalid locale)
TMPDIR=/var/folders/ff/m6cylxhd2csdz9fh62g3djtm0000gq/T/0compile-ZlnGcp
WARNING:root:Error setting locale (eg. Invalid locale)
Note: source /Users/iljah/0inst-test/test/test.xml is a local feed
BUILDDIR=/private/var/folders/ff/m6cylxhd2csdz9fh62g3djtm0000gq/T/0compile-VBoSvz/build
DISTDIR=/private/var/folders/ff/m6cylxhd2csdz9fh62g3djtm0000gq/T/0compile-VBoSvz/test-any-any
SRCDIR=/Users/iljah/0inst-test/test
BINARYFEED=/private/var/folders/ff/m6cylxhd2csdz9fh62g3djtm0000gq/T/0compile-VBoSvz/test-any-any/0install/feed.xml
cd 
/private/var/folders/ff/m6cylxhd2csdz9fh62g3djtm0000gq/T/0compile-VBoSvz/build
CPPFLAGS=/Users/iljah/.local/share/0install.net/site-packages/file/Users__iljah__0inst-test__boost__boost.xml/1.59.0-x86_64/include
Executing: 
[u'/Users/iljah/.local/share/0install.net/site-packages/file/Users__iljah__0inst-test__lfs__bash__bash.xml/4.3.30-x86_64/bin/bash', 
u'-c', u'"$@"', u'-', u'c++', u'/Users/iljah/0inst-test/test/test.cpp', 
u'-o', 
u'/private/var/folders/ff/m6cylxhd2csdz9fh62g3djtm0000gq/T/0compile-VBoSvz/test-any-any/test']
/Users/iljah/0inst-test/test/test.cpp:1:10: fatal error: 
'boost/array.hpp' file not found


------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
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.