parsing of the command line
Frederic-Emmanuel PICCA
piccaf at physics.mcgill.ca
Tue Jan 10 11:10:13 CET 2006
Nagy Thomas wrote:
>That variable (ARGUMENTS) could not be accessed from a
>tool (generic.py), but perhaps you have a workaround ?
>
For now I add the ARGUMENTS to the config
config = {
'modules' : 'generic cppunit',
'builddir' : 'build', # put all object files under 'build/'
'config.h' : 1, # mechanism should be ok
'rpath' : 1, # incomplete
'bootstrap': 1, # incomplete
#'colorful' : not os.environ.has_key('NOCOLORS'), # only with
scons >= 0.96.91 - now miniscons
'colorful' : 0,
'arguments' : ARGUMENTS
}
And in configure I do a:
I add the arguments to the env with env(..., ARGS=arguments)
I know it is not very clean, but It works.
Another option would be to add in the configure the scons parser.
it is two smalls functions. _Add_Targets ans _Add_Arguments
targets = []
xmit_args = []
for a in args:
if '=' in a:
xmit_args.append(a)
else:
targets.append(a)
SCons.Script._Add_Targets(targets)
SCons.Script._Add_Arguments(xmit_args)
What do you think.
More information about the Kde-buildsystem
mailing list