[Scons-users] ToolsForFools wiki suggestions

Peter Cooner petriborg at gmail.com
Sat Nov 24 00:04:02 EST 2012


Story - can be skipped:

So I needed a builder for Google's Protobuf files which uses protoc.
I tried to use the Protoc (protobuf) builder off the wiki -
http://www.scons.org/wiki/ProtocBuilder - but I couldn't make that
work. Through random chance I ended up on the ToolsForFools wiki page
- http://www.scons.org/wiki/ToolsForFools - and what an improvement!

With TFF wiki in hand I spent the next day working through creating an
improved Protoc builder of my own. While I worked through this I did
run into several problems though.


Suggestions for ToolsForFools wiki page:

1. Great page - better then the official documentation! Advertise it,
or something!
2. Every builder page I've ever seen ignore VariantDir -
http://www.scons.org/wiki/VariantDir() - but most of them break if you
are using them!
3. Understanding Dir() and Entry() magic was critical for my builder,
but most builders don't address this, why is that?
4. As a demo for building Tools, I think they should go to a proper
Builder, not just a pseudo-Builder.
5. TFF directly access the env dict, shouldn't it use env.Append(BUILDER=...)
6. TFF doesn't explain the use of the StopError exception.


I've attached my protoc.py file, this one works for me pretty well,
hopefully it works for others. :-)




--
Pete
"Yates went on to say that using MS formats left a fresh, minty feeing
in user's mouths while every time an open [format] is used a kitten
dies." -- maggard (on slashdot)

perl -lne '(1x$_) !~ /^1?$|^(11+?)\1+$/ && print "$_ is prime"'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: protoc.py
Type: application/octet-stream
Size: 4025 bytes
Desc: not available
Url : <http://four.pairlist.net/pipermail/scons-users/attachments/20121124/7c1126bb/attachment.obj>


More information about the Scons-users mailing list