Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan <ry@tinyclouds.org>2009-04-15 12:08:28 +0400
committerRyan <ry@tinyclouds.org>2009-04-15 12:08:28 +0400
commit63a9cd389773b0d986184f5989eeceb299b55ecd (patch)
treea936e68200d6ff23d03f3d09e65b45278002fdbf /wscript
parent0e9e927fcb71d44524340ae4f0392bd1dcced7fb (diff)
everything is changed. i've waited much too long to commit.
this is awful. i'm sorry for being so messy.
Diffstat (limited to 'wscript')
-rw-r--r--wscript28
1 files changed, 24 insertions, 4 deletions
diff --git a/wscript b/wscript
index 361ecffe069..e422cfa0c0a 100644
--- a/wscript
+++ b/wscript
@@ -1,8 +1,11 @@
#! /usr/bin/env python
import Options
+import sys
import os
from os.path import join, dirname, abspath
+import js2c
+
VERSION='0.0.1'
APPNAME='node'
@@ -13,12 +16,12 @@ def set_options(opt):
# the gcc module provides a --debug-level option
opt.tool_options('compiler_cxx')
opt.tool_options('compiler_cc')
- opt.tool_options('ragel', tdir = '.')
+ opt.tool_options('ragel', tdir=".")
def configure(conf):
conf.check_tool('compiler_cxx')
conf.check_tool('compiler_cc')
- conf.check_tool('ragel', tooldir = '.')
+ conf.check_tool('ragel', tooldir=".")
conf.sub_config('deps/libeio')
conf.sub_config('deps/libev')
@@ -42,6 +45,7 @@ def configure(conf):
conf.define("HAVE_CONFIG_H", 1)
conf.write_config_header('config.h')
+
def build(bld):
bld.add_subdirs('deps/libeio deps/libev')
@@ -53,7 +57,7 @@ def build(bld):
v8lib = bld.env["staticlib_PATTERN"] % "v8"
v8 = bld.new_task_gen(
target=join("deps/v8",v8lib),
- rule='cp -rf %s %s && cd %s && scons library=static'
+ rule='cp -rf %s %s && cd %s && scons -Q library=static snapshot=on'
% ( v8dir_src
, deps_tgt
, v8dir_tgt
@@ -80,13 +84,29 @@ def build(bld):
ebb.name = "ebb"
ebb.target = "ebb"
+ ### src/native.cc
+ def javascript_in_c(task):
+ env = task.env
+ source = map(lambda x: x.srcpath(env), task.inputs)
+ targets = map(lambda x: x.srcpath(env), task.outputs)
+ js2c.JS2C(source, targets)
+
+ native_cc = bld.new_task_gen(
+ source="src/main.js",
+ target="src/natives.h",
+ rule=javascript_in_c,
+ before="cxx"
+ )
+
+
### node
node = bld.new_task_gen("cxx", "program")
node.target = 'node'
node.source = """
src/node.cc
src/node_http.cc
- src/node_tcp.cc
+ src/process.cc
+ src/file.cc
src/node_timer.cc
"""
node.includes = """