Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set scons to output full expanded command line?

Tags:

c++

macos

scons

I've come across a build system that uses scons. Not being familiar at all with scons itself being a rather sophisticated framework I get very frustrated not being able to debug build issues.

I want scons to printout the fully expanded command line being invoke ( as you see with most build systems) I found out you could use the --debug=presub option but ( at least on OSX ) it is useless since it prints the value of unexpanded variables

for example:

Building build/obj/ios-uni-rel-sta-clang/common/libs/boost/libs/date_time/src/gregorian/date_generators.i386.o with action:
  $SHCXX -o $TARGET -c $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM $SOURCES

There is also a VERBOSE=1 parameter you can supply on the scons command line but ( at least with the 2.3.4 ) version I got, it doesn't seem to be verbose much anything.

I'm not saying Scons is bad, but it is become a bit taxing and expansive to maintain :(

Anyone familiar with Scons? What module, where is the actual command gets invoked? I just want to add a few prints ...

Alternatively, how can you setup PyDev or PyCharm to hook up using the scons --debug=pdb? Did anyone this?

like image 785
Rastikan Avatar asked Sep 26 '15 17:09

Rastikan


Video Answer


1 Answers

Somewhere in a SConstruct, SConscript, or some python module loaded by either (could be in site_scons under top dir) someone is changing the *COMSTR env variables.

It will look something like:

env['SHCXXCOMSTR'] = "Building $TARGET"

or:

for k in env.keys():
    if k.endswith('COMSTR'):
        env[k] = "Building $TARGET"

You'll want to comment out those lines.

The default SCons behavior is to show the command lines.

http://scons.org/doc/production/HTML/scons-man.html#cv-SHCXXCOMSTR

like image 97
bdbaddog Avatar answered Oct 31 '22 18:10

bdbaddog