[Xorp-users] How to write scons files to add a new folder ?
yewgang
batmanustc at gmail.com
Thu Oct 8 20:22:00 PDT 2015
I want to add new folder in xorp, and this folder has its SConscript file,
but I can't add this folder in xorp/SConscript, I don't know why.
This is my change :
diff --git a/xorp/SConscript b/xorp/SConscript
index ba5400b..6265c7d 100644
--- a/xorp/SConscript
+++ b/xorp/SConscript
@@ -60,4 +60,9 @@ if env['enable_rip']:
if env['enable_vrrp']:
subdirs.append('vrrp')
+if env['enable_nsx_integration']:
+ subdirs.append('nsx_integration')
+
+print '--------------- subdirs = ', subdirs, ' ------------------'
+
SConscript(dirs = subdirs, exports='env')
diff --git a/xorp/SConstruct b/xorp/SConstruct
index 5cc2972..30cc598 100644
--- a/xorp/SConstruct
+++ b/xorp/SConstruct
@@ -101,6 +101,7 @@ vars.AddVariables(
BoolVariable('enable_fea_dummy', 'Build fea-dummy target', True),
BoolVariable('enable_viff_use_ifindex', 'Use VIFF_USE_IFINDEX feature
in Linux kernel 2.6.31+', Fa
BoolVariable('enable_async_server', 'Permit asynchronous method
implementations', False),
+ BoolVariable('enable_nsx_integration', 'Enable Nsx Integration',
True),
BoolVariable('debug_xrldb', 'Build with runtime XRL syntax validation
in Router Manager', False),
EnumVariable('debug', 'Build with debug symbols', 'full',
allowed_values=('no', 'yes', 'full', 'override'),
@@ -282,6 +283,7 @@ print 'Enable FEA Dummy: ', env['enable_fea_dummy']
print 'Enable VIFF_USE_IFINDEX: ', env['enable_viff_use_ifindex']
print 'Enable async method impls: ', env['enable_async_server']
print 'Enable BGP: ', env['enable_bgp']
+print 'Enable Nsx Integration: ', env['enable_nsx_integration']
print 'Enable BuildInfo: ', env['enable_buildinfo']
print 'Xorp can run from BUILD_DIR: ', env['enable_builddirrun']
print 'Try Enable BOOST: ', env['enable_boost']
@@ -605,6 +607,13 @@ if tst and not ((tst == "no") or (tst == "false")):
env['disable_otherlogs'] = True
else:
env['disable_otherlogs'] = False
+
+# Default to enabled
+tst = ARGUMENTS.get('enable_nsx_integration', True)
+if tst and ((tst == "no") or (tst == "false")):
+ env['enable_nsx_integration'] = False
+else:
+ env['enable_nsx_integration'] = True
tst = ARGUMENTS.get('disable_assert', False)
if tst and not ((tst == "no") or (tst == "false")):
And print result is :
--------------- subdirs = ['cli', 'libcomm', 'libxorp', 'libxipc',
'libproto', 'libfeaclient', 'xrl/targets', 'xrl/interfaces',
'etc/templates', 'fea', 'fib2mrib', 'mld6igmp', 'mrt', 'pim', 'policy',
'rib', 'rtrmgr', 'static_routes', 'utils', 'contrib/olsr',
'contrib/wrapper', 'bgp', 'ospf', 'rip', 'vrrp', 'nsx_integration']
------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-users/attachments/20151009/502a636b/attachment.html
More information about the Xorp-users
mailing list