Permalink
Browse files

Cleaned up build scripts and fixed jshint

  • Loading branch information...
1 parent a536048 commit 4445252c57ffe4bf485ae0bd60d2d98bec69883b @tbranyen tbranyen committed Feb 26, 2011
Showing with 14 additions and 10 deletions.
  1. +5 −4 Makefile
  2. +1 −0 configure
  3. +5 −3 util/hint-check.js
  4. +3 −3 wscript
View
@@ -1,16 +1,17 @@
PACKAGE = libgit2
NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node)
+NODEBLD = node-waf
BASE = .
LIBPATH = /usr/local/lib:$(BASE)/vendor
-all: clean build lint
+all: buildbindings lint
-build:
- node-waf configure build
+buildbindings:
+ $(NODEBLD) build
install:
- node-waf install
+ $(NODEBLD) install
clean:
rm -rf ./build
View
@@ -0,0 +1 @@
+node-waf configure
View
@@ -1,7 +1,9 @@
-var nodejshint = require( './nodejshint.js' ).test;
+var nodejshint = require( './nodejshint.js' ).test,
-nodejshint( [ 'lib/index.js', 'lib/ref.js', 'lib/repo.js', 'lib/error.js' ], function( failures ) {
- if( !failures ) {
+files = [ 'lib/index.js', 'lib/ref.js', 'lib/repo.js', 'lib/error.js' ];
+
+nodejshint( files, function( failures ) {
+ if( !files.length ) {
process.exit( 0 );
} else {
process.exit( 1 );
View
@@ -18,13 +18,13 @@ def configure(conf):
conf.check_tool('compiler_cxx')
conf.check_tool('node_addon')
- os.chdir('vendor/libgit2')
- Popen('python waf configure build-shared', shell=True).wait()
-
conf.env.append_value('LIBPATH_GIT2', abspath('build/shared'))
conf.env.append_value('LIB_GIT2', 'git2')
def build(bld):
+ os.chdir('vendor/libgit2')
+ Popen('python waf configure build-shared', shell=True).wait()
+
obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
obj.target = 'nodegit2'
obj.source = 'src/base.cc src/error.cc src/reference.cc src/repo.cc src/commit.cc src/oid.cc src/revwalk.cc'

0 comments on commit 4445252

Please sign in to comment.