diff --git a/SConstruct b/SConstruct index 0e63dd5860..efa2ffbf3c 100644 --- a/SConstruct +++ b/SConstruct @@ -48,7 +48,7 @@ main_env.Append(LIBPATH=[ cwd+'/src/vm', cwd+'/src/vmm', cwd+'/src/lcm', - cwd+'/src/tm', + cwd+'/src/tm', cwd+'/src/dm', cwd+'/src/im', cwd+'/src/rm', @@ -94,15 +94,20 @@ if not main_env.GetOption('clean'): main_env.ParseConfig('share/scons/get_xmlrpc_config client') except Exception, e: print "" - print "Error searching for xmlrpc-c libraries. Please check this things:" + print "Error searching for xmlrpc-c libraries. Please check this"+ + " things:" print "" - print " * You have installed development libraries for xmlrpc-c. One way to check" - print " this is calling xmlrpc-c-config that is provided with the development" + print " * You have installed development libraries for xmlrpc-c. One"+ + " way to check" + print " this is calling xmlrpc-c-config that is provided with the"+ + " development" print " package." - print " * Check that the version of xmlrpc-c is at least 1.06. You can do this also" + print " * Check that the version of xmlrpc-c is at least 1.06. You can"+ + " do this also" print " calling:" print " $ xmlrpc-c-config --version" - print " * If all this requirements are already met please send log files located in" + print " * If all this requirements are already met please send log"+ + " files located in" print " .xmlrpc_test to the mailing list." print "" exit(-1) @@ -127,7 +132,7 @@ build_scripts=[ 'src/tm/SConstruct', 'src/im/SConstruct', 'src/dm/SConstruct', - 'src/scheduler/SConstruct', + 'src/scheduler/SConstruct', 'src/vnm/SConstruct', 'src/hm/SConstruct', ] diff --git a/share/scons/lex_bison.py b/share/scons/lex_bison.py index 10c94e3373..27506aeed8 100644 --- a/share/scons/lex_bison.py +++ b/share/scons/lex_bison.py @@ -23,58 +23,58 @@ import SCons ############ def build_lex(target, source, env): - cwd=os.getcwd() - - src=SCons.Util.to_String(source[0]) - src_dir=os.path.dirname(src) - src_name=os.path.basename(src) - - os.chdir(src_dir) - os.system("flex "+src_name) - os.chdir(cwd) - - return None - + cwd=os.getcwd() + + src=SCons.Util.to_String(source[0]) + src_dir=os.path.dirname(src) + src_name=os.path.basename(src) + + os.chdir(src_dir) + os.system("flex "+src_name) + os.chdir(cwd) + + return None + def emitter_lex(target, source, env): - src=SCons.Util.to_String(source[0]) - src_dir=os.path.dirname(src) - (src_name, src_ext)=os.path.splitext(os.path.basename(src)) - target.append(src_name+".h") - return target, source - + src=SCons.Util.to_String(source[0]) + src_dir=os.path.dirname(src) + (src_name, src_ext)=os.path.splitext(os.path.basename(src)) + target.append(src_name+".h") + return target, source + def add_lex(environment): - lex_bld=SCons.Builder.Builder(action=build_lex, - suffix='.c', - src_suffix='.l', - emitter=emitter_lex) - environment.Append(BUILDERS={'Lex':lex_bld}) + lex_bld=SCons.Builder.Builder(action=build_lex, + suffix='.c', + src_suffix='.l', + emitter=emitter_lex) + environment.Append(BUILDERS={'Lex':lex_bld}) def build_bison(target, source, env): - cwd=os.getcwd() + cwd=os.getcwd() - src=SCons.Util.to_String(source[0]) - src_dir=os.path.dirname(src) - src_name=os.path.basename(src) - (base, ext)=os.path.splitext(src_name) + src=SCons.Util.to_String(source[0]) + src_dir=os.path.dirname(src) + src_name=os.path.basename(src) + (base, ext)=os.path.splitext(src_name) - os.chdir(src_dir) - os.system("bison "+src_name) - os.rename(base+".hh", base+".h") - os.chdir(cwd) + os.chdir(src_dir) + os.system("bison "+src_name) + os.rename(base+".hh", base+".h") + os.chdir(cwd) - return None + return None def emitter_bison(target, source, env): - src=SCons.Util.to_String(source[0]) - src_dir=os.path.dirname(src) - (src_name, src_ext)=os.path.splitext(os.path.basename(src)) - target.append(src_name+".h") - return target, source + src=SCons.Util.to_String(source[0]) + src_dir=os.path.dirname(src) + (src_name, src_ext)=os.path.splitext(os.path.basename(src)) + target.append(src_name+".h") + return target, source def add_bison(environment): - bison_bld=SCons.Builder.Builder(action=build_bison, - suffix='.cc', - src_suffix='.y', - emitter=emitter_bison) - environment.Append(BUILDERS={'Bison':bison_bld}) + bison_bld=SCons.Builder.Builder(action=build_bison, + suffix='.cc', + src_suffix='.y', + emitter=emitter_bison) + environment.Append(BUILDERS={'Bison':bison_bld}) diff --git a/src/client/SConstruct b/src/client/SConstruct index c640dee22b..999cb0623e 100644 --- a/src/client/SConstruct +++ b/src/client/SConstruct @@ -23,8 +23,8 @@ lib_name='oneapi' # Sources to generate the library source_files=[ - 'OneClient.cc', - 'OneClient_C_Wrapper.cc' + 'OneClient.cc', + 'OneClient_C_Wrapper.cc' ] # Compiling flags diff --git a/src/common/SConstruct b/src/common/SConstruct index 64b0e5ab4c..dda3707916 100644 --- a/src/common/SConstruct +++ b/src/common/SConstruct @@ -23,8 +23,8 @@ lib_name='nebula_common' # Sources to generate the library source_files=[ - 'ActionManager.cc', - 'Attribute.cc' + 'ActionManager.cc', + 'Attribute.cc' ] # Build library diff --git a/src/dm/SConstruct b/src/dm/SConstruct index 94ed048a8d..44c3d363ca 100644 --- a/src/dm/SConstruct +++ b/src/dm/SConstruct @@ -23,9 +23,9 @@ lib_name='nebula_dm' # Sources to generate the library source_files=[ - 'DispatchManager.cc', - 'DispatchManagerActions.cc', - 'DispatchManagerStates.cc', + 'DispatchManager.cc', + 'DispatchManagerActions.cc', + 'DispatchManagerStates.cc', ] # Build library diff --git a/src/hm/SConstruct b/src/hm/SConstruct index 17a03feb8d..edd8794d88 100755 --- a/src/hm/SConstruct +++ b/src/hm/SConstruct @@ -23,8 +23,8 @@ lib_name='nebula_hm' # Sources to generate the library source_files=[ - 'HookManager.cc', - 'HookManagerDriver.cc' + 'HookManager.cc', + 'HookManagerDriver.cc' ] test_names=[] diff --git a/src/host/SConstruct b/src/host/SConstruct index 835bc77f95..ad7af690e0 100644 --- a/src/host/SConstruct +++ b/src/host/SConstruct @@ -22,32 +22,32 @@ Import('env') lib_name='nebula_host' if env['parsers']=='yes': - # LEX - parser=env.Lex( - source='host_parser.l' - ) - env.NoClean(parser) + # LEX + parser=env.Lex( + source='host_parser.l' + ) + env.NoClean(parser) - # BISON - parser=env.Bison( - source='host_requirements.y' - ) - env.NoClean(parser) + # BISON + parser=env.Bison( + source='host_requirements.y' + ) + env.NoClean(parser) - parser=env.Bison( - source='host_rank.y' - ) - env.NoClean(parser) + parser=env.Bison( + source='host_rank.y' + ) + env.NoClean(parser) # Sources to generate the library source_files=[ - 'Host.cc', - 'HostShare.cc', - 'HostPool.cc', - 'HostTemplate.cc', - 'host_parser.c', - 'host_requirements.cc', - 'host_rank.cc', + 'Host.cc', + 'HostShare.cc', + 'HostPool.cc', + 'HostTemplate.cc', + 'host_parser.c', + 'host_requirements.cc', + 'host_rank.cc', ] # Build library diff --git a/src/im/SConstruct b/src/im/SConstruct index a4cda201f1..e1da40eaa2 100755 --- a/src/im/SConstruct +++ b/src/im/SConstruct @@ -23,8 +23,8 @@ lib_name='nebula_im' # Sources to generate the library source_files=[ - 'InformationManager.cc', - 'InformationManagerDriver.cc' + 'InformationManager.cc', + 'InformationManagerDriver.cc' ] test_names=[] diff --git a/src/lcm/SConstruct b/src/lcm/SConstruct index a7117b0212..9d0821276f 100644 --- a/src/lcm/SConstruct +++ b/src/lcm/SConstruct @@ -23,9 +23,9 @@ lib_name='nebula_lcm' # Sources to generate the library source_files=[ - 'LifeCycleManager.cc', - 'LifeCycleActions.cc', - 'LifeCycleStates.cc', + 'LifeCycleManager.cc', + 'LifeCycleActions.cc', + 'LifeCycleStates.cc', ] # Build library diff --git a/src/mad/SConstruct b/src/mad/SConstruct index b4ee3deb8f..2200651a97 100644 --- a/src/mad/SConstruct +++ b/src/mad/SConstruct @@ -23,8 +23,8 @@ lib_name='nebula_mad' # Sources to generate the library source_files=[ - 'Mad.cc', - 'MadManager.cc' + 'Mad.cc', + 'MadManager.cc' ] # Build library diff --git a/src/nebula/SConstruct b/src/nebula/SConstruct index 845fb26fac..2805da0ea8 100644 --- a/src/nebula/SConstruct +++ b/src/nebula/SConstruct @@ -23,90 +23,32 @@ lib_name='nebula_core' # Sources to generate the library source_files=[ - 'Nebula.cc', - 'NebulaTemplate.cc', - 'Log.cc' + 'Nebula.cc', + 'NebulaTemplate.cc', + 'Log.cc' ] # Build library env.StaticLibrary(lib_name, source_files) # Build daemon -""" env.Append(LIBS=[ - 'nebula_core', - 'nebula_vmm', - 'nebula_lcm', - 'nebula_im', - 'nebula_hm', - 'nebula_rm', - 'nebula_dm', - 'nebula_tm', - 'nebula_mad', - 'nebula_template', - 'nebula_pool', - 'nebula_host', - 'nebula_vm', - 'nebula_vnm', - 'nebula_common', - 'sqlite3', - 'wwwxml', - 'xmltok', - 'xmlparse', - 'wwwzip', - 'wwwinit', - 'wwwapp', - 'wwwtelnet', - 'wwwhtml', - 'wwwnews', - 'wwwhttp', - 'wwwmime', - 'wwwgopher', - 'wwwftp', - 'wwwfile', - 'wwwdir', - 'wwwcache', - 'wwwstream', - 'wwwmux', - 'wwwtrans', - 'wwwcore', - 'wwwutils', - 'md5', - 'dl', - 'z', - 'pthread', - 'xmlrpc_client++', - 'xmlrpc_client', - 'xmlrpc++', - 'xmlrpc', - 'xmlrpc_util', - 'xmlrpc_xmlparse', - 'xmlrpc_xmltok', - 'xmlrpc_server_abyss++', - 'xmlrpc_server++', - 'xmlrpc_server_abyss', - 'xmlrpc_server', - 'xmlrpc_abyss', -]) -""" - -env.Append(LIBS=[ - 'nebula_core', - 'nebula_vmm', - 'nebula_lcm', - 'nebula_im', - 'nebula_hm', - 'nebula_rm', - 'nebula_dm', - 'nebula_tm', - 'nebula_mad', - 'nebula_template', - 'nebula_pool', - 'nebula_host', - 'nebula_vnm', - 'nebula_vm', - 'nebula_common', - 'sqlite3', + 'nebula_core', + 'nebula_vmm', + 'nebula_lcm', + 'nebula_im', + 'nebula_hm', + 'nebula_rm', + 'nebula_dm', + 'nebula_tm', + 'nebula_mad', + 'nebula_template', + 'nebula_pool', + 'nebula_host', + 'nebula_vnm', + 'nebula_vm', + 'nebula_common', + 'sqlite3', ]) diff --git a/src/pool/SConstruct b/src/pool/SConstruct index 3dc66a4218..05a3867c21 100644 --- a/src/pool/SConstruct +++ b/src/pool/SConstruct @@ -23,8 +23,8 @@ lib_name='nebula_pool' # Sources to generate the library source_files=[ - 'PoolSQL.cc', - 'ObjectSQL.cc' + 'PoolSQL.cc', + 'ObjectSQL.cc' ] # Build library diff --git a/src/rm/SConstruct b/src/rm/SConstruct index 369972eab8..0ac1fdf1bf 100644 --- a/src/rm/SConstruct +++ b/src/rm/SConstruct @@ -27,15 +27,15 @@ source_files=[ 'RequestManagerAction.cc', 'RequestManagerAllocate.cc', 'RequestManagerDeploy.cc', - 'RequestManagerMigrate.cc', + 'RequestManagerMigrate.cc', 'RequestManagerInfo.cc', 'RequestManagerHostAllocate.cc', 'RequestManagerHostDelete.cc', 'RequestManagerHostInfo.cc', - 'RequestManagerHostEnable.cc', - 'RequestManagerVirtualNetworkAllocate.cc', - 'RequestManagerVirtualNetworkInfo.cc', - 'RequestManagerVirtualNetworkDelete.cc', + 'RequestManagerHostEnable.cc', + 'RequestManagerVirtualNetworkAllocate.cc', + 'RequestManagerVirtualNetworkInfo.cc', + 'RequestManagerVirtualNetworkDelete.cc', ] # Build library diff --git a/src/scheduler/SConstruct b/src/scheduler/SConstruct index f38243d2f0..4a0cbc33fd 100644 --- a/src/scheduler/SConstruct +++ b/src/scheduler/SConstruct @@ -27,72 +27,28 @@ lib_name='nebula_scheduler' # Sources to generate the library source_files=[ - 'Scheduler.cc', - 'SchedulerHost.cc', - 'SchedulerVirtualMachine.cc', + 'Scheduler.cc', + 'SchedulerHost.cc', + 'SchedulerVirtualMachine.cc', ] scheduler_names=[ - 'mm_sched' + 'mm_sched' ] # Build library env.StaticLibrary(lib_name, source_files) -""" env.Append(LIBS=[ - 'sqlite3', - lib_name, - 'nebula_core', - 'nebula_host', - 'nebula_vm', - 'nebula_pool', - 'nebula_template', - 'nebula_common', - 'curl', - 'xmlrpc_client++', - 'xmlrpc_client', - 'xmlrpc++', - 'xmlrpc', - 'xmlrpc_util', - 'xmlrpc_xmlparse', - 'xmlrpc_xmltok', - 'wwwxml', - 'xmltok', - 'xmlparse', - 'wwwzip', - 'wwwinit', - 'wwwapp', - 'wwwtelnet', - 'wwwhtml', - 'wwwnews', - 'wwwhttp', - 'wwwmime', - 'wwwgopher', - 'wwwftp', - 'wwwfile', - 'wwwdir', - 'wwwcache', - 'wwwstream', - 'wwwmux', - 'wwwtrans', - 'wwwcore', - 'wwwutils', - 'm', - 'md5' -]) -""" - -env.Append(LIBS=[ - 'sqlite3', - lib_name, - 'nebula_core', - 'nebula_host', - 'nebula_vm', - 'nebula_vnm', - 'nebula_pool', - 'nebula_template', - 'nebula_common', + 'sqlite3', + lib_name, + 'nebula_core', + 'nebula_host', + 'nebula_vm', + 'nebula_vnm', + 'nebula_pool', + 'nebula_template', + 'nebula_common', ]) @@ -102,4 +58,4 @@ if not env.GetOption('clean'): # Build tests for sched in scheduler_names: - env.Program(sched, sched+'.cc') + env.Program(sched, sched+'.cc') diff --git a/src/template/SConstruct b/src/template/SConstruct index 7bf7af1db0..38d024799f 100644 --- a/src/template/SConstruct +++ b/src/template/SConstruct @@ -22,25 +22,25 @@ Import('env') lib_name='nebula_template' if env['parsers']=='yes': - # LEX - parser=env.Lex( - source='template_parser.l' - ) - env.NoClean(parser) + # LEX + parser=env.Lex( + source='template_parser.l' + ) + env.NoClean(parser) - # BISON - parser=env.Bison( - source='template_syntax.y' - ) - env.NoClean(parser) + # BISON + parser=env.Bison( + source='template_syntax.y' + ) + env.NoClean(parser) # Sources to generate the library source_files=[ - 'Template.cc', - 'TemplateSQL.cc', - 'template_parser.c', - 'template_syntax.cc' + 'Template.cc', + 'TemplateSQL.cc', + 'template_parser.c', + 'template_syntax.cc' ] # Build library diff --git a/src/tm/SConstruct b/src/tm/SConstruct index 450d04442c..f29721a069 100644 --- a/src/tm/SConstruct +++ b/src/tm/SConstruct @@ -23,8 +23,8 @@ lib_name='nebula_tm' # Sources to generate the library source_files=[ - 'TransferManager.cc', - 'TransferManagerDriver.cc' + 'TransferManager.cc', + 'TransferManagerDriver.cc' ] # Build library diff --git a/src/vnm/SConstruct b/src/vnm/SConstruct index b5fcd7ddca..841e8338be 100644 --- a/src/vnm/SConstruct +++ b/src/vnm/SConstruct @@ -23,12 +23,12 @@ lib_name='nebula_vnm' # Sources to generate the library source_files=[ - 'Leases.cc', - 'FixedLeases.cc', - 'RangedLeases.cc', - 'VirtualNetwork.cc', - 'VirtualNetworkTemplate.cc', - 'VirtualNetworkPool.cc', + 'Leases.cc', + 'FixedLeases.cc', + 'RangedLeases.cc', + 'VirtualNetwork.cc', + 'VirtualNetworkTemplate.cc', + 'VirtualNetworkPool.cc', ] # Build library