فهرست منبع

SConstruc can parse my options

tanghai 15 سال پیش
والد
کامیت
32b9ffdf5e
1فایلهای تغییر یافته به همراه16 افزوده شده و 1 حذف شده
  1. 16 1
      SConstruct

+ 16 - 1
SConstruct

@@ -1,3 +1,18 @@
 env = DefaultEnvironment()
 
-Export('env')
+def ParseOptions():
+	AddOption('--mode',
+		dest='mode',
+		type='string',
+		nargs=1,
+		action='store',
+		default='dbg',
+		help='build in dbg or opt mode')
+	env['mode'] = GetOption('mode')
+
+ParseOptions()
+
+Export('env')
+
+SConscript('src/SConscript' % x, build_dir=target_dir)
+