Please note:The SCons wiki is in read-only mode due to ongoing spam/DoS issues. Also, new account creation is currently disabled. We are looking into alternative wiki hosts.
Differences between revisions 16 and 17
Revision 16 as of 2005-09-22 22:35:01
Size: 659
Editor: ten-cache1-vif-3
Revision 17 as of 2008-03-12 02:47:06
Size: 659
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

The $STRING expansion in actions makes some assumptions:

  • if the expanded variable is a list of strings, each of them is a single argument to the final command.
  • if the expanded variable is a single string, it is a space-separated list of arguments to the final command.

If you want to force a single string variable to be treated as a single argument, you can do this:

  • action = "compiler.exe ${[MYVAR]}"

The curly braces cause "[MYVAR]" to be evaluated as a Python expression. [MYVAR] is a list containing the single string MYVAR. So your end result is that MYVAR will be quoted as a single arg if it happens to contain spaces.

ArgumentQuoting (last edited 2008-03-12 02:47:06 by localhost)