installer: install node-waf
authorFedor Indutny <fedor.indutny@gmail.com>
Tue, 17 Jan 2012 05:48:50 +0000 (11:48 +0600)
committerRyan Dahl <ry@tinyclouds.org>
Tue, 17 Jan 2012 05:56:05 +0000 (21:56 -0800)
* added --without-waf flag for configure script

configure
tools/installer.js

index 64cb864..5b13b5a 100755 (executable)
--- a/configure
+++ b/configure
@@ -27,6 +27,11 @@ parser.add_option("--without-npm",
     dest="without_npm",
     help="Don\'t install the bundled npm package manager")
 
+parser.add_option("--without-waf",
+    action="store_true",
+    dest="without_waf",
+    help="Don\'t install node-waf")
+
 parser.add_option("--without-isolates",
     action="store_true",
     dest="without_isolates",
@@ -172,6 +177,7 @@ def configure_node(o):
   o['variables']['node_prefix'] = options.prefix if options.prefix else ''
   o['variables']['node_use_dtrace'] = b(options.with_dtrace)
   o['variables']['node_install_npm'] = b(not options.without_npm)
+  o['variables']['node_install_waf'] = b(not options.without_waf)
   o['variables']['host_arch'] = host_arch()
   o['variables']['target_arch'] = options.dest_cpu or target_arch()
 
index f4a07c5..487376d 100644 (file)
@@ -93,11 +93,17 @@ if (cmd === 'install') {
   copy([
     'deps/uv/include/ares.h',
     'deps/uv/include/ares_version.h'
-  ], 'include/node/c-ares/');
+  ], 'include/node/');
 
   // Copy binary file
   copy('out/Release/node', 'bin/node');
 
+  // Install node-waf
+  if (variables.node_install_waf == 'true') {
+    copy('tools/wafadmin', 'lib/node/');
+    copy('tools/node-waf', 'bin/node-waf');
+  }
+
   // Install npm (eventually)
   if (variables.node_install_npm == 'true') {
     copy('deps/npm', 'lib/node_modules/npm');
@@ -106,7 +112,8 @@ if (cmd === 'install') {
   }
 } else {
   remove([
-     'bin/node', 'bin/npm', 'include/node/*', 'lib/node_modules'
+     'bin/node', 'bin/npm', 'bin/node-waf',
+     'include/node/*', 'lib/node_modules', 'lib/node'
   ]);
 }