[Scons-users] Maven Ideas with Scons -- File missing on wiki
Javier Llopis
javier at correo.com
Fri Mar 11 08:58:54 EST 2016
Thank you so much for the file, Bill.
Indeed, I have found in my design that the environment itself has most of what I need. When I create a library --and I create a buch of those- I need to be Return()ing not only the library but also list of include directories, that means either that the project gets a longer and longer list of include paths (which is ugly but not dangerous) or that I need to add a little logic to handle what dependencies are needed by this bit and what dependencies are needed by the other bit. The wiki recipe seems to be doing that in a nice, declarative way. Other than that, I am thinking of either subclassing Environment or creating a class that mostly contains an environment plus a few other bits, or perhaps even nothing at all, as you say, and it's just a matter of always doing things the same way in a consistent manner. I don't yet have a clear idea at this point.
J
On Fri, Mar 11, 2016 at 13:33, Bill Deegan wrote:
On Fri, Mar 11, 2016 at 7:02 AM, Javier Llopis wrote:
Hello,
TL;DR: There is a recipe on the wiki "Maven Ideas with Scons" by Jakob Scheck at https://bitbucket.org/scons/scons/wiki/MavenIdeasWithSCons (https://bitbucket.org/scons/scons/wiki/MavenIdeasWithSCons) that I have found inspiring. Unfortunately, the sources that come with it in a separate file seem to have been lost, possibly during some of the recent site moves. It would be great if someone could give me a pointer to that file, which I would put back to the wiki.
The file is still there, but the link to it wasn't properly translated in the move.
Here's the file:
https://bitbucket.org/scons/scons/wiki/MavenIdeasWithSCons/sources.zip (https://bitbucket.org/scons/scons/wiki/MavenIdeasWithSCons/sources.zip)
I'll get the link updated today.
The broader issue is I need to cut down the boilerplate I find myself writing all the time. I have sources and dependencies that I need to build for windows or Linux, for x86 or x64, with or without debug symbols, and I need to be keeping track of include directories, libraries, library directories, preprocessor symbols and compiler switches, along with one or two custom builders that I have in use. There is a lot of information being passed back and forth and it becomes messy. I have been reading the wiki and earlier list messages for ideas on how to go about this issue and found some good ones here and there. I may need to implement my own 'boilerplate encapsulator class' and I think it could be something like described in the above article. Looking at the sources would save me some time, but I am open to other suggestions, as I don't think this problem is too uncommon.
I'm not sure what couldn't be handled by adding variables to the Environment().
All the items you mention "include directories, libraries, library directories, preprocessor symbols and compiler switches, along with one or two custom builders that I have in use." are simple to add to the env['MY_INCLUDE']='#abc/def', and then use later.
Just Export() and Import() the environment between your SConstruct and SConscript(s)
Is there something more complicated that that?
-Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160311/79feb0e2/attachment.html>
More information about the Scons-users
mailing list