[Scons-users] Depends(...) function some questions and hello!

pholat pholat at gmail.com
Tue May 31 03:48:33 EDT 2016


Hi All,

I'm pholat and recently rewrote half of our Build system to SCons (
compilation part) and would love to share few notices and ask some
questions.

1) Depends(..) from empty object
http://stackoverflow.com/questions/37477440/scons-dependencies-in-sconstruct?noredirect=1#comment62560274_37477440
When user adds depends manually there is no warning or error on empty
dependency. I find it misleading.
pseudo code example

SConcritpt:
a = SConstruct(<SConstruct1 path>)
b = SConstruct(<SConstruct2 path>)
Depends(a,b) # SConstruct1 doesn't return a thing, no warning/error here

SConstruct1:
#empty

SConstruct2:
env = Environment(...)
wal = env.Program(...)
Return('wal')

end of example

As in buildsystem I edited&developed I had at least 20 SConscripts where
dependencies are added in for loop. I'm still a bit confused:
When install path from SConscript1 will be added to LIBPATH in SConscript2
will dependencies be solved right? Even so, what with custom actions in
functions which are executed with Builder(..) ( like from the example:
http://scons.org/doc/0.97/HTML/scons-user/x2435.html ) Where parts of
libraries are removed, where object name stays the same, only smaller.

2) Environment tool selection
I'm using SCons with RVDS4 with addons. That's why Tool needed customizing,
as it's close to g++ there were not too many issues on Linux, but on
Windows platform it was more problematic. I mostly did that with
Env['element'] substitution, but is there a way to force g++ behavior when
Environment(...) is created and Windows path is added?

3) Windows tool substitution - '/OUT' string and file prefix '@'
While linking on windows '/OUT' is hard coded in SCons. I found it rather
frustrating. I do not want to modify SCons for our project - as it has to
work 'out of the box'. Do you guys know kind of nice hack to modify this
execution?
Also on Windows there is automatic file export when terminal character
limit is expected. It probably works great, but my compiler uses
--via='filename' syntax which is why without modifying SCons sources I had
to create temporary files on my own. SCons on windows uses @ prefix. Due to
our compiler limitations I've to use temporary files on Linux too though.

If any of that from point 2 or 3 is something which could be further
developed or changed I can pass files and line numbers and my SCons version
where my concerns are located. I could develop something too, although I've
very limited time and thus it would take a bit. Please feel free to correct
me if I'm wrong somewhere &/ ask if I let something not clear.

Final notice: it was easier to me to create SCons environment for cross
compilation with RVDS4 in SCons than with CMake and I find it really handy
that I could script some stuff in python in that.

Best regards,
Adam A. Dobrowolski || pholat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160531/f5cc0c48/attachment.html>


More information about the Scons-users mailing list