On Mon, 14 Mar 2011 08:14:19 +0000
Nick Kew <niq@apache.org> wrote:
> > However, it can't be done with apxs :(
>
> It hadn't crossed my mind to try that with apxs (adjust by hand where
> necessary). But in principle, Good Idea! Patches welcome!
>
> Sorry, no new suggestions
The "problem" turns out to sort of obvious -- it's because this string
gets passed thru the shell *twice* (once to apxs and then from apxs to
gcc). So what works is:
apxs -c -D mydef=\\\\"$SOME_ENV_VAR\\\\"
Which leaves a set of escaped double quotes after the first pass for
the second pass...
--
"Enthusiasm is not the enemy of the intellect." (said of Irving Howe)
"The angel of history[...]is turned toward the past." (Walter Benjamin)
|