Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

copy the file directly in the wscript instead of requiring another sc…

…ript
  • Loading branch information...
commit c1f952fd45caea3e7a353171d9856336ce5bad38 1 parent fce09b1
Konstantin Käfer authored
Showing with 17 additions and 9 deletions.
  1. +0 −8 build.sh
  2. +17 −1 wscript
View
8 build.sh
@@ -1,8 +0,0 @@
-#!/bin/sh
-#
-# Author: Ivan Egorov (egorich.3.04@gmail.com).
-#
-
-node-waf configure $*
-node-waf build
-cp ./build/default/compress-bindings.node ./lib/compress
View
18 wscript
@@ -1,11 +1,18 @@
import Options
from os import unlink, symlink, popen
from os.path import exists
+from shutil import copy2 as copy
srcdir = "."
blddir = "build"
VERSION = "0.1.10"
+TARGET = 'compress-bindings'
+TARGET_FILE = '%s.node' % TARGET
+built = 'build/default/%s' % TARGET_FILE
+dest = 'lib/compress/%s' % TARGET_FILE
+
+
def set_options(opt):
opt.tool_options("compiler_cxx")
@@ -46,7 +53,16 @@ def configure(conf):
def build(bld):
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
obj.cxxflags = ["-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall"]
- obj.target = "compress-bindings"
+ obj.target = TARGET
obj.source = "src/compress.cc"
obj.defines = bld.env.DEFINES
obj.uselib = bld.env.USELIB
+
+
+def shutdown():
+ if Options.commands['clean']:
+ if exists(dest):
+ unlink(dest)
+ else:
+ if exists(built):
+ copy(built, dest)
Please sign in to comment.
Something went wrong with that request. Please try again.