[Scons-users] Feedback request: an AsciiDoc tool

Dirk Bächle tshortik at gmx.de
Sun Nov 25 21:56:09 EST 2012


Hi Marc,

thanks a lot for contributing to the SCons project with your asciidoc
Builder/Tool. Looks like you really did your homework... ;)

Following my comments to your questions:

On 26.11.2012 01:12, Marc Joliet wrote:

> Hi all!

>

> [....]

> I do have some questions, though:

>

> 1.) Exactly what calls exists(env) and why? I've wondered about this before,

> and I tried unconditionally returning False, with no change in build system

> behavior. So what is the effect of this function supposed to be? The best

> google gave me was an old blog post where somebody was trying out SCons

> and wondered the same thing (the person liked SCons, BTW).


The exists() method can be called by you in your SConscripts, if you
want. SCons only calls exists() when it checks for the default Tools
like "gcc", "link", "ar" and so on. That's why you don't see any obvious
change when returning False in your add-on Tool.


> 2.) Is it bad/wrong to add a pseudo-builder to env['BUILDERS']?


It has a drawback for more recent SCons versions (starting with 0.98, I
think). When you add Builders to an
Environment in this way, and then decide to Clone() the Environment, the
added Builders don't get copied too.
But when you use AddMethod(), SCons internally keeps track of the added
methods and Clone() works as expected.


>

> 3.) When I pass skeys to the constructor of a recursive Scanner, why does it

> scan files with non-matching suffixes?

>

> [....]


I'll try to have a look at your current code tomorrow. Then I can
hopefully tell you more...if someone else is faster, all the better. ;)


> 4.) Now a longer bit about emitters.

>

> [...]


Using an Emitter for your chain of build steps seems like the right
thing to me, and it should work. Again, I'll check out the sources... I
assume the error is still present in the current head revision?
Just remembering, the Doxygen Builder showed similar problems (like
reverse dependencies) at first. Later I found out that for the Emitter
or Scanner (not sure about this) the arguments target vs source were
swapped. Maybe you want to check that in the meantime...

Best regards,

Dirk




More information about the Scons-users mailing list