summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-07-24 14:28:16 -0400
committerEliot Horowitz <eliot@10gen.com>2009-07-24 14:28:16 -0400
commita62f1b40ba338ff2f0e3e3b751f1d1599bd27bcc (patch)
tree68ecaa3c6d1bd90e0e817452d9b3f7ff0dd0b24f /SConstruct
parent6e3a37e594f6ba07d305c3b71d891c3d11497469 (diff)
parentde9d456c3577f6be96ccb458953a0c086343eaa2 (diff)
downloadmongo-a62f1b40ba338ff2f0e3e3b751f1d1599bd27bcc.tar.gz
Merge branch 'master' of git@github.com:mongodb/mongo
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct26
1 files changed, 16 insertions, 10 deletions
diff --git a/SConstruct b/SConstruct
index 5e7676089a2..9ffab71cc56 100644
--- a/SConstruct
+++ b/SConstruct
@@ -152,6 +152,10 @@ AddOption( "--boost-compiler",
# --- environment setup ---
+def removeIfInList( lst , thing ):
+ if thing in lst:
+ lst.remove( thing )
+
def printLocalInfo():
import sys, SCons
print( "scons version: " + SCons.__version__ )
@@ -170,7 +174,7 @@ darwin = False
windows = False
freebsd = False
solaris = False
-force64 = not GetOption( "force64" ) is None
+force64 = not GetOption( "force64" ) is None
if not force64 and os.getcwd().endswith( "mongo-64" ):
force64 = True
print( "*** assuming you want a 64-bit build b/c of directory *** " )
@@ -218,7 +222,7 @@ if GetOption( "extrapath" ) is not None:
env.Append( CPPPATH=[ x + "/include" ] )
env.Append( LIBPATH=[ x + "/lib" ] )
release = True
-
+
# ------ SOURCE FILE SETUP -----------
commonFiles = Split( "stdafx.cpp buildinfo.cpp db/jsobj.cpp db/json.cpp db/commands.cpp db/lasterror.cpp db/nonce.cpp db/queryutil.cpp shell/mongo.cpp" )
@@ -342,7 +346,7 @@ elif "linux2" == os.sys.platform:
nixLibPrefix = "lib64"
env.Append( LIBPATH=["/usr/lib64" , "/lib64" ] )
env.Append( LIBS=["pthread"] )
-
+
if force64:
print( "error: force64 doesn't make sense on a 64-bit machine" )
Exit(1)
@@ -620,7 +624,8 @@ def doConfigure( myenv , needJava=True , needPcre=True , shell=False ):
myCheckLib( "pcrecpp" , True )
myCheckLib( "pcre" , True )
- myenv["_HAVEPCAP"] = myCheckLib( "pcap", staticOnly=release )
+ myenv["_HAVEPCAP"] = myCheckLib( "pcap" )
+ removeIfInList( myenv["LIBS"] , "pcap" )
# this is outside of usesm block so don't have to rebuild for java
if windows:
@@ -730,10 +735,6 @@ env.Append( BUILDERS={'JSHeader' : jshBuilder})
# --- targets ----
-def removeIfInList( lst , thing ):
- if thing in lst:
- lst.remove( thing )
-
clientEnv = env.Clone();
clientEnv.Append( CPPPATH=["../"] )
clientEnv.Prepend( LIBS=[ "mongoclient"] )
@@ -788,7 +789,9 @@ perftest = testEnv.Program( "perftest", "dbtests/perf/perftest.cpp" )
clientTests += [ clientEnv.Program( "clientTest" , [ "client/examples/clientTest.cpp" ] ) ]
# --- sniffer ---
+mongosniff_built = False
if darwin or clientEnv["_HAVEPCAP"]:
+ mongosniff_built = True
sniffEnv = clientEnv.Clone()
sniffEnv.Append( LIBS=[ "pcap" ] )
sniffEnv.Program( "mongosniff" , "tools/sniffer.cpp" )
@@ -1153,13 +1156,13 @@ def installBinary( e , name ):
name += ".exe"
inst = e.Install( installDir + "/bin" , name )
-
+
fullInstallName = installDir + "/bin/" + name
allBinaries += [ name ]
if solaris or linux:
e.AddPostAction( inst, e.Action( 'strip ' + fullInstallName ) )
-
+
if linux and len( COMMAND_LINE_TARGETS ) == 1 and str( COMMAND_LINE_TARGETS[0] ) == "s3dist":
e.AddPostAction( inst , checkGlibc )
@@ -1171,6 +1174,9 @@ installBinary( env , "mongoimportjson" )
installBinary( env , "mongofiles" )
+if mongosniff_built:
+ installBinary(env, "mongosniff")
+
installBinary( env , "mongod" )
installBinary( env , "mongos" )