[Scons-dev] on demand Program tool initialization
Dirk Bächle
tshortik at gmx.de
Sun Aug 10 04:30:55 EDT 2014
Hi Anatoly,
On 10.08.2014 10:16, anatoly techtonik wrote:
> Hi,
>
> I am looking at D SConstruct example.
> http://stackoverflow.com/a/9917185/239247
> How does Program determine that it needs to call D tool?
in this case the D Builders are registered with the Program() method as
"source builders". This means, if Program() encounters a non-object
extension (like the suffix ".d") it will look up its internal list of
source builders, and try to find one for converting ".d"->"*.o".
So the decision is based on the suffix of the source file.
>
> What is the minimum information that tool should tell about
> itself so that Program can determine its source files and not
> confuse them with anything else?
>
> Because this way you don't need to search for tool or initialize
> it until there is a need to build source file for that tool. There
> might be need to adjust default parameters for that tool, but
> that's another problem.
>
> So *on demand* Program tool initialization means that tool
> is fully initialized only when build demands building targets
> that are associated with some tool.
>
> Is it possible to add this part already?
We have started to discuss these kind of things on the ToolchainRevamp
pages in the Wiki:
http://www.scons.org/wiki/ToolchainRevamp
and
http://scons.org/wiki/RevampToolsSubsystem
. Feel free to add your points and comments there.
Best regards,
Dirk
More information about the Scons-dev
mailing list