Substfile / Textfile builders

Mats Wichmann <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <[email protected]>
This topic is from https://github.com/SCons/scons/issues/3147

Bill suggested it ought to move here for a while, I'm following up to
try to move it forward, since the issue has sat for a few months now.

substfile and textfile have to be imported explicity (tools=[...])

The issue filer suggests they should be part of default.

The default comes from the list GlobalDefaultBuilders in
Scripts/__init__.py.  The docs aren't really clear on whether a given
builder is part of the default or needs to be listed. The manpage entry
contains a substfile example which hints it's not default, though it
does not say anything explicitly:

  env = Environment(tools = ['default', 'textfile'])

  env['prefix'] = '/usr/bin'
  script_dict = {'@prefix@': '/bin', '@exec_prefix@': '$prefix'}
  env.Substfile('script.in', SUBST_DICT = script_dict)
  ...

The textfile example, on the other hand, does not show the creation of
the environment, just dives right in:

  # builds/writes foo.txt
  env.Textfile(target = 'foo.txt', source = ['Goethe', 42, 'Schiller'])
  ...

So I guess there are three questions here:

(a) should substfile and testfile be part of the default?
(b) is there any guideline for default/not-default within scons?
(c) can we come up with wording for the manpage to indicate whether a
builder is default or needs to be specified? or is that too fragile
since it has to be kept up to date manually at the moment?

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.