Skip to content
Snippets Groups Projects
Commit 617f773d authored by Jason Hiser's avatar Jason Hiser :tractor:
Browse files

changes to support scons from peasoup-umbrella dir

parent 6bc67a12
No related branches found
No related tags found
No related merge requests found
Pipeline #2071 failed
......@@ -2,4 +2,6 @@ installed
manifest.txt.config
ubuntu16_files/manifest.txt.config
zest_runtime
.sconsign.dblite
build
import shutil
import os
import tarfile
Import('env')
#if [ ! -f manifest.txt.config -o ! -d "$PS_INSTALL" ]; then
if not os.path.isfile("manifest.txt.config"):
print "Doing pedi setup"
pedisetup = Command( target = "./testoutput-setup",
source = "./SConscript",
action = os.environ['PEDI_HOME'] +
"/pedi --setup -m manifest.txt -l ida -l ida_key -l ps -l zipr -l stars -i " +
os.environ['PS_INSTALL']
)
else:
print "Pedi already setup"
pedisetup=list()
# build stars and libirdb
libirdb= SConscript("irdb-libs/SConscript") # , variant_dir='build/irdb-libs')
Depends(libirdb,pedisetup)
libsmpsa= SConscript("SMPStaticAnalyzer/SConscript") #
# specify some explicit dependencies to make sure these build in order
Depends(libsmpsa,libirdb)
# now finish building irdb-libs once stars is setup
libirdbdeep=SConscript("irdb-libs/SConscript.deep", variant_dir='build/irdb-libs')
Depends(libirdbdeep,libsmpsa)
# list of zipr plugins and irdb xforms to build
transformDirs='''
zipr_large_only_plugin
irdb_transforms
zipr_push64_reloc_plugin
zipr_relax_plugin
zipr
zipr_trace_plugin
zipr_unpin_plugin
'''
# build the xforms and plugins
xforms=list()
for i in Split(transformDirs):
Export('env')
xform = SConscript(i+"/SConscript")
print "After step "+str(i)+", env[LINKFLAGS]=:"+env['LINKFLAGS']
Depends(xform, libirdbdeep)
xforms = xforms + xform
#finally, run pedi to do the final install
pedi = Command( target = "./testoutput-install",
source = "./SConscript",
action = os.environ['PEDI_HOME']+"/pedi -m manifest.txt " )
Depends(pedi, xforms)
Default( pedi )
if env.GetOption('clean') and os.path.isfile("manifest.txt.config"):
with open("manifest.txt.config") as myfile:
first_line=myfile.readlines()[0] #put here the interval you want
first_line=first_line.rstrip()
# if [[ $(head -1 manifest.txt.config) == $PS_INSTALL ]] ; then
if str(first_line) == str(os.environ['PS_INSTALL']):
print "Doing pedi clean"
os.system( "pwd; $PEDI_HOME/pedi -c -m manifest.txt " )
shutil.rmtree(os.environ['PS_INSTALL'])
else:
print "Eliding pedi clean as I'm not the root"
print "Root is '"+first_line+"'"
print "I am '"+str(os.environ['PS_INSTALL'])+"'"
import os
import sys
env=Environment()
# default build options
env.Replace(CFLAGS=" -fPIC -fmax-errors=2 -Wall -Werror -fmax-errors=2 ")
env.Replace(CXXFLAGS=" -fPIC -fmax-errors=2 -Wall -Werror -fmax-errors=2 ")
env.Replace(LINKFLAGS="-fPIC -fmax-errors=2 -Wall -Werror -fmax-errors=2 -Wl,-unresolved-symbols=ignore-in-shared-libs ")
env.Replace(SHLINKFLAGS="-fPIC -fmax-errors=2 -Wall -Werror -fmax-errors=2 -shared ") # default is ignore all link errors
# parse arguments into env and set default values.
env.Replace(SECURITY_TRANSFORMS_HOME=os.environ['SECURITY_TRANSFORMS_HOME'])
env.Replace(IRDB_SDK=os.environ['IRDB_SDK'])
env.Replace(SMPSA_HOME=os.environ['SMPSA_HOME'])
env.Replace(debug=ARGUMENTS.get("debug",0))
env.Replace(PEDI_HOME=os.environ['PEDI_HOME'])
if int(env['debug']) == 1:
print "Setting debug mode"
env.Append(CFLAGS=" -g ")
env.Append(CXXFLAGS=" -g ")
env.Append(LINKFLAGS=" -g ")
env.Append(SHLINKFLAGS=" -g ")
else:
print "Setting release mode"
env.Append(CFLAGS=" -O ")
env.Append(CXXFLAGS=" -O ")
env.Append(LINKFLAGS=" -O ")
env.Append(SHLINKFLAGS=" -O ")
Export('env')
SConscript("SConscript")
Subproject commit ac449438c65065002cde8f229ba69eececa678f2
Subproject commit 35e23d7b0764cf88ed1335e199c9074bb0903c57
Subproject commit d1cf03ff37a850d7fb98b16458747411ac083638
Subproject commit 83aba772d54135dee90fbf744e4c7b571c9dae1f
Subproject commit b53be562746eb6e6a677205116fdeed64c4504ed
Subproject commit 42b9ffbd71eb9403bdc462ff96efd845c831a3b9
Subproject commit 5b986cf6ee06139c4659da6218d4fc1d3b14c708
Subproject commit 6ec310e6f9bb2fb7d972d17e5942d959091b4a81
Subproject commit 3c03d1d879d783a880b7989c38c5d83fe92e1c84
Subproject commit 27cf31c68d1827e164503f67bb1a63b507bb3c60
Subproject commit 12339c9789869e11d7d13925eb0f6e34cdeccfc4
Subproject commit 2dfdbe478368eb8a995f43fed087bf0a8cbb568f
Subproject commit 356757cf051c251f61d55bfc59bc5255b59f5d4a
Subproject commit d918e4ae5ebae423ee43799c0d9cfb87650b741e
Subproject commit 82783bd2f3ffb67fc4d7535bc56553551183eae7
Subproject commit be4f331648edf94d2c35f3a4d3b6b8bb684918fe
Subproject commit 117d8f422006cc72d3a8109ad55e367585a18057
Subproject commit 6d590ba4831d0fe114ee50db11a7437a39fd5864
Subproject commit 246f0706c720c3c4d5908d9c401c29f508729b63
Subproject commit 485c201e78a001bea38cad0c38377e4b472ee745
Subproject commit 1c1e26a1c38ed817a22c1f01742960725346d62a
Subproject commit 36c745483816c879bc3a521c0ebb55393f6cee50
Subproject commit 46d1a74bc5f1b8504a3d0e04cf770351aecb8582
Subproject commit 8c159de15a16b023747187c1db12e2eb9dc3ca22
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment