0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 07:00:59 +01:00

rename a few files to remove node_ prefix

This commit is contained in:
Ryan 2009-04-18 15:35:42 +02:00
parent 102c6399ac
commit 67af958f81
7 changed files with 45 additions and 26 deletions

View File

@ -1,5 +1,5 @@
#include "node_http.h"
#include "node.h"
#include "http.h"
#include <oi_socket.h>
#include <ebb_request_parser.h>
@ -651,7 +651,7 @@ newHTTPServer (const Arguments& args)
}
void
Init_http (Handle<Object> target)
NodeInit_http (Handle<Object> target)
{
HandleScope scope;

View File

@ -3,6 +3,6 @@
#include <v8.h>
void Init_http (v8::Handle<v8::Object> target);
void NodeInit_http (v8::Handle<v8::Object> target);
#endif

View File

@ -3,8 +3,8 @@
//#include "net.h"
#include "file.h"
#include "process.h"
#include "node_http.h"
#include "node_timer.h"
#include "http.h"
#include "timers.h"
#include "natives.h"
@ -247,11 +247,11 @@ main (int argc, char *argv[])
g->Set(String::New("ARGV"), arguments);
// BUILT-IN MODULES
Init_timer(g);
//NodeInit_net(g);
NodeInit_timers(g);
NodeInit_process(g);
NodeInit_file(g);
Init_http(g);
NodeInit_http(g);
// NATIVE JAVASCRIPT MODULES
TryCatch try_catch;

View File

@ -1,8 +0,0 @@
#ifndef node_timer_h
#define node_timer_h
#include <v8.h>
void Init_timer (v8::Handle<v8::Object> target);
#endif // node_timer_h

View File

@ -1,5 +1,5 @@
#include "node.h"
#include "node_timer.h"
#include "timers.h"
#include <assert.h>
using namespace v8;
@ -188,7 +188,7 @@ static Handle<Value> setInterval
}
void
Init_timer (Handle<Object> target)
NodeInit_timers (Handle<Object> target)
{
HandleScope scope;

8
src/timers.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef node_timers_h
#define node_timers_h
#include <v8.h>
void NodeInit_timers (v8::Handle<v8::Object> target);
#endif // node_timers_h

37
wscript
View File

@ -17,6 +17,12 @@ def set_options(opt):
opt.tool_options('compiler_cxx')
opt.tool_options('compiler_cc')
opt.tool_options('ragel', tdir=".")
opt.add_option( '--debug'
, action='store_true'
, default=False
, help='Build debug variant [Default: False]'
, dest='debug'
)
def configure(conf):
conf.check_tool('compiler_cxx')
@ -43,15 +49,27 @@ def configure(conf):
conf.define("HAVE_GNUTLS", 1)
conf.define("HAVE_CONFIG_H", 1)
conf.write_config_header('config.h')
conf.env.append_value('CXXFLAGS', '-g')
# Split off debug variant before adding variant specific defines
debug_env = conf.env.copy()
conf.set_env_name('debug', debug_env)
conf.setenv('debug')
# Configure debug variant
conf.setenv('debug')
debug_env.set_variant('debug')
debug_env.append_value('CCFLAGS', ['-DDEBUG', '-g', '-O0', '-Wall', '-Wextra'])
debug_env.append_value('CXXFLAGS', ['-DDEBUG', '-g', '-O0', '-Wall', '-Wextra'])
conf.write_config_header("config.h")
# Configure default variant
conf.setenv('default')
conf.env.append_value('CCFLAGS', ['-DNDEBUG', '-O2'])
conf.env.append_value('CXXFLAGS', ['-DNDEBUG', '-O2'])
conf.write_config_header("config.h")
def build(bld):
# Use debug environment when --enable-debug is given
bld.add_subdirs('deps/libeio deps/libev')
### v8
@ -65,10 +83,7 @@ def build(bld):
target=join("deps/v8",v8lib),
rule='cp -rf %s %s && cd %s && scons -Q mode=debug library=static snapshot=on'
#rule='cp -rf %s %s && cd %s && scons -Q library=static snapshot=on'
% ( v8dir_src
, deps_tgt
, v8dir_tgt
),
% ( v8dir_src , deps_tgt , v8dir_tgt),
before="cxx"
)
bld.env["CPPPATH_V8"] = "deps/v8/include"
@ -112,10 +127,10 @@ def build(bld):
node.target = 'node'
node.source = """
src/node.cc
src/node_http.cc
src/http.cc
src/process.cc
src/file.cc
src/node_timer.cc
src/timers.cc
"""
node.includes = """
src/
@ -127,3 +142,7 @@ def build(bld):
"""
node.uselib_local = "oi ev eio ebb"
node.uselib = "V8"
if Options.options.debug:
print "debug build!"
bld.env = bld.env_of_name('debug')