diff options
author | Eliot Horowitz <eliot@10gen.com> | 2011-02-15 03:02:45 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2011-02-16 18:50:09 -0500 |
commit | 02eafcd82f8079727a14893c2d80d0ecf1b1f174 (patch) | |
tree | 3ae1f10b77441105a25df47391ac6467944a6160 | |
parent | 3a5cfc0a371d4983cceb4e50c06cbc07356d551a (diff) | |
download | mongo-02eafcd82f8079727a14893c2d80d0ecf1b1f174.tar.gz |
cleaning module system a bit
-rw-r--r-- | SConstruct | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct index 500008cf80d..41383b159e1 100644 --- a/SConstruct +++ b/SConstruct @@ -378,10 +378,18 @@ for x in os.listdir( "db/modules/" ): print( "adding module: " + x ) moduleNames.append( x ) modRoot = "db/modules/" + x + "/" - serverOnlyFiles += Glob( modRoot + "src/*.cpp" ) + modBuildFile = modRoot + "build.py" + myModule = None if os.path.exists( modBuildFile ): - modules += [ imp.load_module( "module_" + x , open( modBuildFile , "r" ) , modBuildFile , ( ".py" , "r" , imp.PY_SOURCE ) ) ] + myModule = imp.load_module( "module_" + x , open( modBuildFile , "r" ) , modBuildFile , ( ".py" , "r" , imp.PY_SOURCE ) ) + modules.append( myModule ) + + if myModule and "customIncludes" in dir(myModule) and myModule.customIncludes: + pass + else: + serverOnlyFiles += Glob( modRoot + "src/*.cpp" ) + allClientFiles = commonFiles + coreDbFiles + [ "client/clientOnly.cpp" , "client/gridfs.cpp" ]; @@ -867,7 +875,10 @@ def doConfigure( myenv , needPcre=True , shell=False ): removeIfInList( myenv["LIBS"] , "wpcap" ) for m in modules: - m.configure( conf , myenv ) + if "customIncludes" in dir(m) and m.customIncludes: + m.configure( conf , myenv , serverOnlyFiles ) + else: + m.configure( conf , myenv ) # XP_* is for spidermonkey. # this is outside of usesm block so don't have to rebuild for java |