[Scons-users] How to override ".in" source suffix for Substfile Builder?
Dirk Bächle
tshortik at gmx.de
Sun Nov 25 17:58:05 EST 2012
Hi Matt,
On 25.11.2012 05:25, M Busche wrote:
> So I was trying to get the Builder Substfile (as described in the scons man page) to work with a source file that does NOT end with the default suffix ".in". How do you do that?
>
> My sconscript file:
>
> env = Environment(tools = ['default', 'textfile'])
> dict = {'c': 'C', 'f': 'F'}
> env.Substfile(dest='bar', source='foo', SUBST_DICT = dict)
>
> The error I'm getting:
>
> scons: Reading SConscript files ...
> scons: done reading SConscript files.
> scons: Building targets ...
> scons: *** [foo] Source `foo.in' not found, needed by target `foo'.
> scons: building terminated because of errors.
can you try to explicitly specify the full name of the source file,
including the suffix you'd like to use:
env.Substfile(dest='bar', source='foo.argh', SUBST_DICT = dict)
? Does it work then (it should actually)?
Best regards,
Dirk
> I think builders usually have a SUFFIX variable you can set to change this behavior, but I don't see it mentioned in the man page.
Yes they do, and it is set to '.in' for the Substfile Builder. This
means that whenever you don't enter a suffix for your source, it gets an
'.in' appended. If you provide a complete filename (either target or
source), SCons relies on your input and doesn't try to decorate it with
prefixes and suffixes any further...
More information about the Scons-users
mailing list