Browse Source

rename a few files to remove node_ prefix

v0.7.4-release
Ryan 16 years ago
parent
commit
67af958f81
  1. 4
      src/http.cc
  2. 2
      src/http.h
  3. 8
      src/node.cc
  4. 8
      src/node_timer.h
  5. 4
      src/timers.cc
  6. 8
      src/timers.h
  7. 35
      wscript

4
src/node_http.cc → src/http.cc

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

2
src/node_http.h → src/http.h

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

8
src/node.cc

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

8
src/node_timer.h

@ -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

4
src/node_timer.cc → src/timers.cc

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

8
src/timers.h

@ -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

35
wscript

@ -17,6 +17,12 @@ def set_options(opt):
opt.tool_options('compiler_cxx') opt.tool_options('compiler_cxx')
opt.tool_options('compiler_cc') opt.tool_options('compiler_cc')
opt.tool_options('ragel', tdir=".") 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): def configure(conf):
conf.check_tool('compiler_cxx') conf.check_tool('compiler_cxx')
@ -43,15 +49,27 @@ def configure(conf):
conf.define("HAVE_GNUTLS", 1) conf.define("HAVE_GNUTLS", 1)
conf.define("HAVE_CONFIG_H", 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() debug_env = conf.env.copy()
conf.set_env_name('debug', debug_env) conf.set_env_name('debug', debug_env)
# Configure debug variant
conf.setenv('debug') 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): def build(bld):
# Use debug environment when --enable-debug is given
bld.add_subdirs('deps/libeio deps/libev') bld.add_subdirs('deps/libeio deps/libev')
### v8 ### v8
@ -65,10 +83,7 @@ def build(bld):
target=join("deps/v8",v8lib), 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 mode=debug library=static snapshot=on'
#rule='cp -rf %s %s && cd %s && scons -Q library=static snapshot=on' #rule='cp -rf %s %s && cd %s && scons -Q library=static snapshot=on'
% ( v8dir_src % ( v8dir_src , deps_tgt , v8dir_tgt),
, deps_tgt
, v8dir_tgt
),
before="cxx" before="cxx"
) )
bld.env["CPPPATH_V8"] = "deps/v8/include" bld.env["CPPPATH_V8"] = "deps/v8/include"
@ -112,10 +127,10 @@ def build(bld):
node.target = 'node' node.target = 'node'
node.source = """ node.source = """
src/node.cc src/node.cc
src/node_http.cc src/http.cc
src/process.cc src/process.cc
src/file.cc src/file.cc
src/node_timer.cc src/timers.cc
""" """
node.includes = """ node.includes = """
src/ src/
@ -127,3 +142,7 @@ def build(bld):
""" """
node.uselib_local = "oi ev eio ebb" node.uselib_local = "oi ev eio ebb"
node.uselib = "V8" node.uselib = "V8"
if Options.options.debug:
print "debug build!"
bld.env = bld.env_of_name('debug')

Loading…
Cancel
Save