OSDN Git Service

SCons: proply check for any unknown commandline variables, and alert the user if...
authorMichael Curran <mick@kulgan.net>
Thu, 2 Jun 2011 00:54:49 +0000 (10:54 +1000)
committerMichael Curran <mick@kulgan.net>
Thu, 2 Jun 2011 00:54:49 +0000 (10:54 +1000)
nvdaHelper/sconscript
sconstruct

index 53b71f4..168b499 100644 (file)
@@ -30,13 +30,8 @@ archClientInstallDirs={
        'x86_64':clientDir.Dir('x64'),\r
 }\r
 \r
-vars = Variables()\r
-vars.Add(ListVariable("nvdaHelperDebugFlags", "a list of debugging features you require", 'symbols', ["symbols","debugCRT","RTC","noOptimize"]))\r
-vars.Add(EnumVariable('nvdaHelperLogLevel','The level of logging you wish to see, lower is more verbose','15',allowed_values=[str(x) for x in xrange(60)]))\r
-\r
 #Build nvdaHelper for needed architectures\r
 for arch in env['targetArchitectures']: \r
        archEnv=env.Clone(TARGET_ARCH=arch,tools=['windowsSdk','midl','msrpc','boost','default'])\r
-       vars.Update(archEnv)\r
        archEnv.SConscript('archBuild_sconscript',exports={'env':archEnv,'clientInstallDir':archClientInstallDirs[arch],'libInstallDir':archLibInstallDirs[arch]},variant_dir='build/%s'%arch)\r
 \r
index 33e3945..fa82e96 100755 (executable)
@@ -79,6 +79,11 @@ vars.Add(PathVariable("certFile", "The certificate file with which to sign execu
 vars.Add("certPassword", "The password for the private key in the signing certificate", "")\r
 vars.Add(PathVariable("outputDir", "The directory where the final built archives and such will be placed", "output",PathVariable.PathIsDirCreate))\r
 vars.Add(ListVariable('targetArchitectures','Which architectures should NVDA support?','all',['x86','x86_64']))\r
+vars.Add(ListVariable("nvdaHelperDebugFlags", "a list of debugging features you require", 'symbols', ["symbols","debugCRT","RTC","noOptimize"]))\r
+vars.Add(EnumVariable('nvdaHelperLogLevel','The level of logging you wish to see, lower is more verbose','15',allowed_values=[str(x) for x in xrange(60)]))\r
+\r
+#Base environment for this and sub sconscripts\r
+env = Environment(variables=vars,tools=["textfile","gettext","t2t",keyCommandsDocTool,'doxygen'])\r
 \r
 #Check for any unknown variables\r
 unknown=vars.UnknownVariables().keys()\r
@@ -86,7 +91,6 @@ if len(unknown)>0:
        print "Unknown commandline variables: %s"%unknown\r
        Exit(1)\r
 \r
-env = Environment(variables=vars,tools=["textfile","gettext","t2t",keyCommandsDocTool,'doxygen'])\r
 version = env["version"]\r
 release = env["release"]\r
 certFile = env["certFile"]\r
@@ -283,3 +287,4 @@ symbolsArchive = env.SzArchive(outputDir.File("%s_debugSymbols.zip" % outFilePre
 env.Alias("symbolsArchive", symbolsArchive)\r
 \r
 env.Default(portableDist)\r
+\r