Revision 63a9cd38 wscript
wscript | ||
---|---|---|
1 | 1 |
#! /usr/bin/env python |
2 | 2 |
import Options |
3 |
import sys |
|
3 | 4 |
import os |
4 | 5 |
from os.path import join, dirname, abspath |
5 | 6 |
|
7 |
import js2c |
|
8 |
|
|
6 | 9 |
VERSION='0.0.1' |
7 | 10 |
APPNAME='node' |
8 | 11 |
|
... | ... | |
13 | 16 |
# the gcc module provides a --debug-level option |
14 | 17 |
opt.tool_options('compiler_cxx') |
15 | 18 |
opt.tool_options('compiler_cc') |
16 |
opt.tool_options('ragel', tdir = '.')
|
|
19 |
opt.tool_options('ragel', tdir=".")
|
|
17 | 20 |
|
18 | 21 |
def configure(conf): |
19 | 22 |
conf.check_tool('compiler_cxx') |
20 | 23 |
conf.check_tool('compiler_cc') |
21 |
conf.check_tool('ragel', tooldir = '.')
|
|
24 |
conf.check_tool('ragel', tooldir=".")
|
|
22 | 25 |
|
23 | 26 |
conf.sub_config('deps/libeio') |
24 | 27 |
conf.sub_config('deps/libev') |
... | ... | |
42 | 45 |
conf.define("HAVE_CONFIG_H", 1) |
43 | 46 |
conf.write_config_header('config.h') |
44 | 47 |
|
48 |
|
|
45 | 49 |
def build(bld): |
46 | 50 |
bld.add_subdirs('deps/libeio deps/libev') |
47 | 51 |
|
... | ... | |
53 | 57 |
v8lib = bld.env["staticlib_PATTERN"] % "v8" |
54 | 58 |
v8 = bld.new_task_gen( |
55 | 59 |
target=join("deps/v8",v8lib), |
56 |
rule='cp -rf %s %s && cd %s && scons library=static'
|
|
60 |
rule='cp -rf %s %s && cd %s && scons -Q library=static snapshot=on'
|
|
57 | 61 |
% ( v8dir_src |
58 | 62 |
, deps_tgt |
59 | 63 |
, v8dir_tgt |
... | ... | |
80 | 84 |
ebb.name = "ebb" |
81 | 85 |
ebb.target = "ebb" |
82 | 86 |
|
87 |
### src/native.cc |
|
88 |
def javascript_in_c(task): |
|
89 |
env = task.env |
|
90 |
source = map(lambda x: x.srcpath(env), task.inputs) |
|
91 |
targets = map(lambda x: x.srcpath(env), task.outputs) |
|
92 |
js2c.JS2C(source, targets) |
|
93 |
|
|
94 |
native_cc = bld.new_task_gen( |
|
95 |
source="src/main.js", |
|
96 |
target="src/natives.h", |
|
97 |
rule=javascript_in_c, |
|
98 |
before="cxx" |
|
99 |
) |
|
100 |
|
|
101 |
|
|
83 | 102 |
### node |
84 | 103 |
node = bld.new_task_gen("cxx", "program") |
85 | 104 |
node.target = 'node' |
86 | 105 |
node.source = """ |
87 | 106 |
src/node.cc |
88 | 107 |
src/node_http.cc |
89 |
src/node_tcp.cc |
|
108 |
src/process.cc |
|
109 |
src/file.cc |
|
90 | 110 |
src/node_timer.cc |
91 | 111 |
""" |
92 | 112 |
node.includes = """ |
Also available in: Unified diff