diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-08-23 13:56:19 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-08-23 14:10:35 -0700 |
commit | 879eb16280688436d791ebb79b05198ac4e4b038 (patch) | |
tree | ed5358535b804753c896624ec09e815081fc7ac4 /wscript | |
parent | 85f7b78e9beb467d9f89746b9dd03219aa224967 (diff) | |
download | android-node-v8-879eb16280688436d791ebb79b05198ac4e4b038.tar.gz android-node-v8-879eb16280688436d791ebb79b05198ac4e4b038.tar.bz2 android-node-v8-879eb16280688436d791ebb79b05198ac4e4b038.zip |
Have WAF variants match GYP configuration names
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 90 |
1 files changed, 45 insertions, 45 deletions
@@ -65,31 +65,31 @@ def set_options(opt): , action='store' , type='string' , default=False - , help='Install into this libdir [Default: ${PREFIX}/lib]' + , help='Install into this libdir [Release: ${PREFIX}/lib]' ) opt.add_option( '--debug' , action='store_true' , default=False - , help='Build debug variant [Default: False]' + , help='Build debug variant [Release: False]' , dest='debug' ) opt.add_option( '--profile' , action='store_true' , default=False - , help='Enable profiling [Default: False]' + , help='Enable profiling [Release: False]' , dest='profile' ) opt.add_option( '--efence' , action='store_true' , default=False - , help='Build with -lefence for debugging [Default: False]' + , help='Build with -lefence for debugging [Release: False]' , dest='efence' ) opt.add_option( '--without-snapshot' , action='store_true' , default=False - , help='Build without snapshotting V8 libraries. You might want to set this for cross-compiling. [Default: False]' + , help='Build without snapshotting V8 libraries. You might want to set this for cross-compiling. [Release: False]' , dest='without_snapshot' ) @@ -499,7 +499,7 @@ def configure(conf): # Split off debug variant before adding variant specific defines debug_env = conf.env.copy() - conf.set_env_name('debug', debug_env) + conf.set_env_name('Debug', debug_env) if (sys.platform.startswith("win32")): # Static pthread @@ -508,8 +508,8 @@ def configure(conf): conf.env.append_value('CPPFLAGS', "-DPTW32_STATIC_LIB") # Configure debug variant - conf.setenv('debug') - debug_env.set_variant('debug') + conf.setenv('Debug') + debug_env.set_variant('Debug') debug_env.append_value('CPPFLAGS', '-DDEBUG') debug_compile_flags = ['-g', '-O0', '-Wall', '-Wextra'] debug_env.append_value('CCFLAGS', debug_compile_flags) @@ -517,7 +517,7 @@ def configure(conf): conf.write_config_header("config.h") # Configure default variant - conf.setenv('default') + conf.setenv('Release') default_compile_flags = ['-g', '-O3'] conf.env.append_value('CCFLAGS', default_compile_flags) conf.env.append_value('CXXFLAGS', default_compile_flags) @@ -542,7 +542,7 @@ def v8_cmd(bld, variant): toolchain = "gcc" - if variant == "default": + if variant == "Release": mode = "release" else: mode = "debug" @@ -581,7 +581,7 @@ def build_v8(bld): + bld.path.ant_glob('v8/include/*') + bld.path.ant_glob('v8/src/*'), target = bld.env["staticlib_PATTERN"] % "v8", - rule = v8_cmd(bld, "default"), + rule = v8_cmd(bld, "Release"), before = "cxx", install_path = None) @@ -591,18 +591,18 @@ def build_v8(bld): v8.uselib = "EXECINFO" bld.env["CPPPATH_V8"] = "deps/v8/include" - t = join(bld.srcnode.abspath(bld.env_of_name("default")), v8.target) - bld.env_of_name('default').append_value("LINKFLAGS_V8", t) + t = join(bld.srcnode.abspath(bld.env_of_name("Release")), v8.target) + bld.env_of_name('Release').append_value("LINKFLAGS_V8", t) ### v8 debug if bld.env["USE_DEBUG"]: - v8_debug = v8.clone("debug") - v8_debug.rule = v8_cmd(bld, "debug") + v8_debug = v8.clone("Debug") + v8_debug.rule = v8_cmd(bld, "Debug") v8_debug.target = bld.env["staticlib_PATTERN"] % "v8_g" v8_debug.uselib = "EXECINFO" bld.env["CPPPATH_V8_G"] = "deps/v8/include" - t = join(bld.srcnode.abspath(bld.env_of_name("debug")), v8_debug.target) - bld.env_of_name('debug').append_value("LINKFLAGS_V8_G", t) + t = join(bld.srcnode.abspath(bld.env_of_name("Debug")), v8_debug.target) + bld.env_of_name('Debug').append_value("LINKFLAGS_V8_G", t) bld.install_files('${PREFIX}/include/node/', 'deps/v8/include/*.h') @@ -635,7 +635,7 @@ def build_uv(bld): source = 'deps/uv/include/uv.h', target = 'deps/uv/uv.a', before = "cxx", - rule = uv_cmd(bld, 'default') + rule = uv_cmd(bld, 'Release') ) uv.env.env = dict(os.environ) @@ -643,17 +643,17 @@ def build_uv(bld): uv.env.env['CXX'] = sh_escape(bld.env['CXX'][0]) uv.env.env['CPPFLAGS'] = "-DPTW32_STATIC_LIB" - t = join(bld.srcnode.abspath(bld.env_of_name("default")), uv.target) - bld.env_of_name('default').append_value("LINKFLAGS_UV", t) + t = join(bld.srcnode.abspath(bld.env_of_name("Release")), uv.target) + bld.env_of_name('Release').append_value("LINKFLAGS_UV", t) if bld.env["USE_DEBUG"]: - uv_debug = uv.clone("debug") - uv_debug.rule = uv_cmd(bld, 'debug') + uv_debug = uv.clone("Debug") + uv_debug.rule = uv_cmd(bld, 'Debug') uv_debug.env.env = dict(os.environ) uv_debug.env.env['CPPFLAGS'] = "-DPTW32_STATIC_LIB" - t = join(bld.srcnode.abspath(bld.env_of_name("debug")), uv_debug.target) - bld.env_of_name('debug').append_value("LINKFLAGS_UV", t) + t = join(bld.srcnode.abspath(bld.env_of_name("Debug")), uv_debug.target) + bld.env_of_name('Debug').append_value("LINKFLAGS_UV", t) bld.install_files('${PREFIX}/include/node/', 'deps/uv/include/*.h') @@ -695,7 +695,7 @@ def build(bld): http_parser.target = "http_parser" http_parser.install_path = None if bld.env["USE_DEBUG"]: - http_parser.clone("debug") + http_parser.clone("Debug") if product_type_is_lib: http_parser.ccflags = '-fPIC' @@ -706,12 +706,12 @@ def build(bld): f.close macros_loc_debug = join( - bld.srcnode.abspath(bld.env_of_name("debug")), + bld.srcnode.abspath(bld.env_of_name("Debug")), "macros.py" ) macros_loc_default = join( - bld.srcnode.abspath(bld.env_of_name("default")), + bld.srcnode.abspath(bld.env_of_name("Release")), "macros.py" ) @@ -768,7 +768,7 @@ def build(bld): # error that was had into the git commit meessage. git-blame to find out # where.) if bld.env["USE_DEBUG"]: - native_cc_debug = native_cc.clone("debug") + native_cc_debug = native_cc.clone("Debug") native_cc_debug.rule = javascript_in_c_debug native_cc.rule = javascript_in_c_debug @@ -783,7 +783,7 @@ def build(bld): ) if bld.env["USE_DEBUG"]: - dtrace_g = dtrace.clone("debug") + dtrace_g = dtrace.clone("Debug") bld.install_files('${LIBDIR}/dtrace', 'src/node.d') @@ -820,8 +820,8 @@ def build(bld): rule = dtrace_postprocess ) - t = join(bld.srcnode.abspath(bld.env_of_name("default")), dtracepost.target) - bld.env_of_name('default').append_value('LINKFLAGS', t) + t = join(bld.srcnode.abspath(bld.env_of_name("Release")), dtracepost.target) + bld.env_of_name('Release').append_value('LINKFLAGS', t) # # Note that for the same (mysterious) issue outlined above with respect @@ -832,10 +832,10 @@ def build(bld): # LINKFLAGS_V8_G. # if bld.env["USE_DEBUG"]: - dtracepost_g = dtracepost.clone("debug") + dtracepost_g = dtracepost.clone("Debug") dtracepost_g.rule = dtrace_postprocess - t = join(bld.srcnode.abspath(bld.env_of_name("debug")), dtracepost.target) - bld.env_of_name("debug").append_value('LINKFLAGS_V8_G', t) + t = join(bld.srcnode.abspath(bld.env_of_name("Debug")), dtracepost.target) + bld.env_of_name("Debug").append_value('LINKFLAGS_V8_G', t) ### node lib @@ -904,7 +904,7 @@ def build(bld): bld.env.append_value('LINKFLAGS', '-Wl,--export-all-symbols') bld.env.append_value('LINKFLAGS', '-Wl,--out-implib,default/libnode.dll.a') bld.env.append_value('LINKFLAGS', '-Wl,--output-def,default/libnode.def') - bld.install_files('${LIBDIR}', "build/default/libnode.*") + bld.install_files('${LIBDIR}', "build/Release/libnode.*") if (sys.platform.startswith("win32")): # Static libgcc @@ -929,11 +929,11 @@ def build(bld): node_conf.install_path = '${PREFIX}/include/node' if bld.env["USE_DEBUG"]: - node_g = node.clone("debug") + node_g = node.clone("Debug") node_g.target = "node_g" node_g.uselib += ' V8_G UV ' - node_conf_g = node_conf.clone("debug") + node_conf_g = node_conf.clone("Debug") node_conf_g.dict = subflags(node_g) node_conf_g.install_path = None @@ -971,15 +971,15 @@ def shutdown(): elif not Options.commands['clean']: if sys.platform.startswith("win32"): - if os.path.exists('build/default/node.exe'): - os.system('cp build/default/node.exe .') - if os.path.exists('build/debug/node_g.exe'): - os.system('cp build/debug/node_g.exe .') + if os.path.exists('build/Release/node.exe'): + os.system('cp build/Release/node.exe .') + if os.path.exists('build/Debug/node_g.exe'): + os.system('cp build/Debug/node_g.exe .') else: - if os.path.exists('build/default/node') and not os.path.exists('node'): - os.symlink('build/default/node', 'node') - if os.path.exists('build/debug/node_g') and not os.path.exists('node_g'): - os.symlink('build/debug/node_g', 'node_g') + if os.path.exists('build/Release/node') and not os.path.exists('node'): + os.symlink('build/Release/node', 'node') + if os.path.exists('build/Debug/node_g') and not os.path.exists('node_g'): + os.symlink('build/Debug/node_g', 'node_g') else: if sys.platform.startswith("win32"): if os.path.exists('node.exe'): os.unlink('node.exe') |