Skip to content

Commit

Permalink
Cleaned up build scripts and fixed jshint
Browse files Browse the repository at this point in the history
  • Loading branch information
tbranyen committed Feb 26, 2011
1 parent a536048 commit 4445252
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
9 changes: 5 additions & 4 deletions Makefile
@@ -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
Expand Down
1 change: 1 addition & 0 deletions configure
@@ -0,0 +1 @@
node-waf configure
8 changes: 5 additions & 3 deletions util/hint-check.js
@@ -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 );
Expand Down
6 changes: 3 additions & 3 deletions wscript
Expand Up @@ -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'
Expand Down

0 comments on commit 4445252

Please sign in to comment.