[Scons-users] dollar sign in source file path

Gilles CARRY gilles.carry at st.com
Tue Feb 7 10:50:47 EST 2017


Hello,

I have a bunch of source files having a '$' (dollar) sign in the path. 
Unfortunately, I have no control over these files so I cannot rename them.
When declaring these files as input files or dependencies (using 
env.Command() or env.Depends() ) to build the target, I get this error:
     scons: *** SyntaxError `unexpected EOF while parsing (<string>, 
line 1)' trying to evaluate `$SOMETHING.class'

Catching and passing the exception makes another error pop up later:
     Explicit dependency `the_path_name_here$SOMETHING.class' not found, 
needed by target `mytarget'.

Escaping dollar with a backslash avoids first error (unexpected EOF 
while parsing...) but still raises:
     Explicit dependency `the_path_name_here\$SOMETHING.class' not 
found, needed by target `mytarget'.

Any idea how I can turn off the $ signs expansion in this case?
Or any other good idea?

I'm using:
SCons by Steven Knight et al.:
     script: v2.3.0, 2013/03/03 09:48:35, by garyo on reepicheep
     engine: v2.3.0, 2013/03/03 09:48:35, by garyo on reepicheep
     engine path: ['/usr/lib/scons/SCons']


Thanks for reading.

Best regards,
Gilles.


More information about the Scons-users mailing list