[Scons-users] Extracting "-I" paths in a complex tree

Gary Oberbrunner garyo at oberbrunner.com
Fri Jan 17 08:13:39 EST 2014


Maybe start by instrumenting the C scanner which is in
SCons/engine/SCons/Scanner/__init__.py to make it print out what you
need. If that works to your satisfaction, you could subclass the
source or monkey-patch the scanner with your version.

Alternatively, just try running 'scons --tree=prune' or one of the
other tree options; that prints out the whole dependency tree. It's
not meant for machine consumption but you might be able to parse that
into something useful.

On Fri, Jan 17, 2014 at 7:40 AM, Rupert Swarbrick <rswarbrick at gmail.com> wrote:

> Hi,

>

> I've just started working on a reasonably large C project that uses scons as

> its build system. I'm also keen on working in Emacs and would like to get

> Semantic/CEDET working. This isn't too difficult, but I need to be able to

> work out what the include paths are for a given file.

>

> The "obvious solution" would be to run scons somehow on the tree in a way

> that, instead of building the files, printed out CPPPATH etc. for each of

> them. Even better, to be able to do that for just the file I'm interested

> in. Is this possible?

>

> Alternatively, I suppose I could do something where the relevant flags got

> registered in a file somewhere when an actual build happened. Since they're

> not going to change very often, I'm not too worried about keeping them up to

> date with the current sconscript files.

>

> In either case, it would be awesome if I could "insinuate" this code without

> actually changing the main files in the tree: sadly not all of my co-workers

> have seen the light re Emacs yet :-)

>

> I hope this isn't an FAQ - I couldn't find anything when searching, but I

> struggled to thing of good search terms, so maybe I'm missing something

> obvious?

>

> Many thanks,

>

> Rupert

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>




--
Gary


More information about the Scons-users mailing list