Fix build: the LUMIERA_PLUGIN didn't get through to the object compilation

This commit is contained in:
Fischlurch 2011-02-06 15:12:13 +01:00
parent 88678209bc
commit ff0ae1527a
3 changed files with 7 additions and 4 deletions

View file

@ -90,7 +90,7 @@ def setupBasicEnvironment(localDefinitions):
env.Append ( CCCOM=' -std=gnu99') env.Append ( CCCOM=' -std=gnu99')
env.Append ( SHCCCOM=' -std=gnu99') # workaround for a bug: CCCOM currently doesn't honour CFLAGS, only CCFLAGS env.Append ( SHCCCOM=' -std=gnu99') # workaround for a bug: CCCOM currently doesn't honour CFLAGS, only CCFLAGS
env.Replace( CPPPATH =["#src"] # used to find includes, "#" means always absolute to build-root env.Replace( CPPPATH =["#src"] # used to find includes, "#" means always absolute to build-root
, CPPDEFINES=['-DLUMIERA_VERSION='+VERSION ] # note: it's a list to append further defines , CPPDEFINES=['LUMIERA_VERSION='+VERSION ] # note: it's a list to append further defines
, CCFLAGS='-Wall -Wextra ' , CCFLAGS='-Wall -Wextra '
, CFLAGS='-std=gnu99' , CFLAGS='-std=gnu99'
) )
@ -367,7 +367,7 @@ def defineBuildTargets(env, artifacts):
envGtk.mergeConf(['gtkmm-2.4','gthread-2.0','cairomm-1.0','gdl','xv','xext','sm']) envGtk.mergeConf(['gtkmm-2.4','gthread-2.0','cairomm-1.0','gdl','xv','xext','sm'])
envGtk.Append(LIBS=core) envGtk.Append(LIBS=core)
objgui = srcSubtree(envGtk,'src/gui') objgui = srcSubtree(envGtk,'src/gui', appendCPP='LUMIERA_PLUGIN')
guimodule = envGtk.LumieraPlugin('gtk_gui', objgui, install=True) guimodule = envGtk.LumieraPlugin('gtk_gui', objgui, install=True)
artifacts['gui'] = ( guimodule artifacts['gui'] = ( guimodule
+ [env.GuiResource(f) for f in env.Glob('src/gui/*.rc')] + [env.GuiResource(f) for f in env.Glob('src/gui/*.rc')]

View file

@ -49,11 +49,12 @@ def isHelpRequest():
def srcSubtree(env,tree,isShared=True,builder=None, **args): def srcSubtree(env,tree,isShared=True,builder=None,appendCPP=None, **args):
""" convenience wrapper: scans the given subtree, which is """ convenience wrapper: scans the given subtree, which is
relative to the current SConscript, find all source files and relative to the current SConscript, find all source files and
declare them as Static or SharedObjects for compilation declare them as Static or SharedObjects for compilation
""" """
if appendCPP: env.Append(CPPDEFINES=appendCPP)
root = env.subst(tree) # expand Construction Vars root = env.subst(tree) # expand Construction Vars
if not builder: if not builder:
if isShared: if isShared:
@ -160,7 +161,7 @@ def createPlugins(env, dir, **kw):
@return: a list of build nodes defining a plugin for each of these source trees. @return: a list of build nodes defining a plugin for each of these source trees.
""" """
return [env.LumieraPlugin( getDirname(tree) return [env.LumieraPlugin( getDirname(tree)
, srcSubtree(env, tree) , srcSubtree(env, tree, appendCPP='LUMIERA_PLUGIN')
, **kw , **kw
) )
for tree in findSrcTrees(dir) for tree in findSrcTrees(dir)

View file

@ -185,6 +185,8 @@ class WrappedStandardExeBuilder(SCons.Util.Proxy):
def __init__(self, originalBuilder): def __init__(self, originalBuilder):
SCons.Util.Proxy.__init__ (self, originalBuilder) SCons.Util.Proxy.__init__ (self, originalBuilder)
def __nonzero__(self): return True
def __call__(self, env, target=None, source=None, **kw): def __call__(self, env, target=None, source=None, **kw):
""" when the builder gets invoked from the SConscript... """ when the builder gets invoked from the SConscript...
create a clone environment for specific configuration create a clone environment for specific configuration