[Omake] Strings
Aleksey Nogin
anogin at hrl.com
Wed Oct 17 09:31:02 PDT 2007
On 17.10.2007 03:18, Matthieu Dubuget wrote:
> I'm trying to pass a simple quoted string to a command line, but fail miserably.
>
> I would like this to be given to the command line :
> \libpath:"..\lib"
>
>
> OMakefile Command line
> produced Comments
> -------------------------------------------------------------------------------------------------------------------------------------
> LDFLAGS += AqDrv4.lib \libpath:"..\lib" AqDrv4.lib
> \libpath:..\\lib quotes disappeared
>
> \ was escaped
Matthew,
You may be confusing the "pretty-printed" form of the command lines,
which OMake prints out with the arguments that command being executed
will actually get. To make sure you see what the command actually gets,
use something like
.PHONY: test_ldflags
test_ldflags:
echo $(LDFLAGS)
If you do want the command to actually get the quotes, then you need to
escape or quote them. Either of the following would work
LDFLAGS += \libpath:$'"..\lib"'
- build . <test_ldflags>
+ Shell.echo(\libpath:'"..\\lib"')
\libpath:"..\lib"
LDFLAGS += \libpath:'"..\lib"'
- build . <test_ldflags>
+ Shell.echo(\libpath:"'"..\\lib"'")
\libpath:"..\lib"
LDFLAGS += \libpath:\"..\lib\"
- build . <test_ldflags>
+ Shell.echo(\libpath:\"..\lib\")
\libpath:"..\lib"
Aleksey
--
Aleksey Nogin, Research Scientist
Advanced Technologies Department, Information & System Sciences Lab
HRL Laboratories, LLC, Malibu, CA
More information about the Omake
mailing list