Re: How to expand environment variable in compilation command?
Thomas Leonard <[email protected]>
| Newsgroups | gmane.comp.file-systems.zero-install.devel |
|---|---|
| Message-ID | <CAG4opy9mS=U7w1FtyXDq-_282kXgu1ybFaN9f=S-u6asKQ+WtQ@mail.gmail.com> |
On 8 September 2015 at 19:01, Ilja Honkonen <[email protected]> wrote: > Hello > Is there a way to make 0install/0compile expand multiple items in an > environment variable into command line arguments for a program? A local > feed of mine depends on boost headers: > <requires interface = '../boost/boost.xml'> > <environment name = 'CPPFLAGS' insert = 'include' mode = 'append'> > </environment> > </requires> > which works well when I use shell-command = 'c++ -I $CPPFLAGS > $SRCDIR/test.cpp -o $DISTDIR/test' to compile but as soon as I have > several dependencies injected to CPPFLAGS it fails. The documentation > and example for <for-each item-from='...' separator='...'? > ... > </for-each> wasn't very clear and I couldn't get it to do anything, can > it do what I'd need in this case (for each item in CPPFLAGS append -I > $item to shell-command) or is it for something else? Thanks <for-each> needs to go inside <runner> or <command>. e.g. <runner interface='http://repo.roscidus.com/e/e-core'> <arg>-cpa</arg> <arg>$SWT_JAR</arg> <for-each item-from="EXTRA_E_OPTIONS" separator=" "> <arg>${item}</arg> </for-each> </runner> -- Dr Thomas Leonard http://roscidus.com/blog/ GPG: DA98 25AE CAD0 8975 7CDA BD8E 0713 3F96 CA74 D8BA ------------------------------------------------------------------------------