[Scons-users] Custom Builder Problems

Sean McCauliff Sean.D.McCauliff at nasa.gov
Thu Dec 19 19:16:52 EST 2013

Hi I'm new to Scons. Sorry if this has been asked before.

I'm trying to create a custom builder for mex files. These are shared
libraries that are then linked into Matlab at run time. I've run into
one or two custom builders for mex files but I'm not able to get them to
work so I decided I would just write my own.

I want to be able to check if the user wanted to build in optimized or
debug mode and then set the correct flags for the 'mex' executable (the
thing that is going to build the mex file). It's a little unclear how
build variables are propagated to the builders. If I do env['LIBS'] I
get a list of additional libraries to link with, but I don't see my
'compileMode' variable there. My other problem is that env['CPPPATH']
contains a list of additional include paths, but one of them is
specified with a '#' that I thought would automatically resolve to the
path of the SConstruct file. This turns out not to be the case and the
'#' character is then included as part of the action.

Any help would be appreciated.


More information about the Scons-users mailing list