Re: How to expand environment variable in compilation command?
Thomas Leonard <[email protected]>
| Newsgroups | gmane.comp.file-systems.zero-install.devel |
|---|---|
| Message-ID | <CAG4opy-E-iCreOC8y7zd0H6SvsFLCGeCs0LXTrqz_soB0EbMRQ@mail.gmail.com> |
On 8 September 2015 at 19:39, Ilja Honkonen <[email protected]> wrote: >> <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> > > It doesn't seem to do anything inside a compile command: > > <?xml version="1.0" ?> > <interface > xmlns = 'http://zero-install.sourceforge.net/2004/injector/interface' > xmlns:compile = > 'http://zero-install.sourceforge.net/2006/namespaces/0compile' > > > <name>test</name> > <summary>test</summary> > <implementation id = '.' local-path = '.' version = '0.2' arch = '*-src'> > <command name = 'compile' shell-command = 'c++ $SRCDIR/test.cpp -o > $DISTDIR/test'> 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> ... (it's a bit ugly because you're searching for c++ in $PATH rather than using a 0install interface, but in your case that may be what you want) -- Dr Thomas Leonard http://roscidus.com/blog/ GPG: DA98 25AE CAD0 8975 7CDA BD8E 0713 3F96 CA74 D8BA ------------------------------------------------------------------------------ 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