Skip to content

Commit 2b28639

Browse files
committed
Finalized installation in makefile
1 parent 54a656e commit 2b28639

8 files changed

Lines changed: 24 additions & 13 deletions

File tree

Makefile

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,32 @@ NODEBLD = node-waf
44

55
BASE = .
66
LIBPATH = /usr/local/lib:$(BASE)/vendor
7+
NODE_LIB_PATH = ~/.node_libraries
8+
INSTALL_PATH = $(NODE_LIB_PATH)/nodegit2
79

8-
all: buildbindings lint
10+
all: buildbindings
911

1012
buildbindings:
1113
$(NODEBLD) build
1214

1315
install:
14-
$(NODEBLD) install
16+
mkdir -p $(INSTALL_PATH)
17+
mkdir -p $(INSTALL_PATH)/build/default
18+
mkdir -p $(INSTALL_PATH)/lib
19+
20+
cp -f $(BASE)/build/default/nodegit2.node $(INSTALL_PATH)/build/default/nodegit2.node
21+
cp -f $(BASE)/lib/* $(INSTALL_PATH)/lib/
22+
cp -f $(BASE)/package.json $(INSTALL_PATH)/
23+
24+
uninstall:
25+
rm -rf $(INSTALL_PATH)
1526

1627
clean:
17-
rm -rf ./build
18-
rm -rf ./vendor/libgit2/build
28+
rm -rf $(BASE)/build
29+
rm -rf $(BASE)/vendor/libgit2/build
1930

2031
unittest:
2132
$(NODEJS) $(BASE)/test/index.js test
2233

2334
lint:
24-
node ./util/hint-check.js
35+
$(NODEJS) $(BASE)/util/hint-check.js

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ To run `nodegit2` you need `Node.js` and to run unit tests you will need to have
1919
### Mac OS X/Linux/Unix ###
2020

2121
#### Install `nodegit2` by cloning source from __GitHub__ and running the `configure`, `make`, and `make install` commands: ####
22+
\*Note: `nodegit2` assumes your library path exists at ~/.node_libraries.\*
2223

2324
[tim@thinkpad Projects]$ git clone git://github.com/tbranyen/nodegit2.git
2425
[tim@thinkpad Projects]$ cd nodegit2
2526
[tim@thinkpad nodegit2]$ ./configure
2627
[tim@thinkpad nodegit2]$ make
27-
[tim@thinkpad nodegit2]$ sudo make install
28+
[tim@thinkpad nodegit2]$ make install
2829

2930
### Windows via Cygwin ###
3031

example/dummyrepo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit d29b7fecf71d0ef4887071ac18dc87f40c2fd4e1
1+
Subproject commit 2f6cbe055f1a6ca0a3ba524ba88a7806ba507a89

src/revwalk.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Handle<Value> RevWalk::New(const Arguments& args) {
6565
}
6666

6767
Repo *repo = ObjectWrap::Unwrap<Repo>(args[0]->ToObject());
68-
int err = revwalk->New(repo);
68+
revwalk->New(repo);
6969

7070
revwalk->Wrap(args.This());
7171

test/convenience-repo.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ exports.constructor = function( test ){
3737

3838
// Test invalid repository
3939
git.repo( '/etc/hosts', function( err, path ) {
40-
console.log( "TEST", err );
4140
test.equals( 'The specified repository is invalid', err, 'Invalid repository error code' );
4241

4342
// Test valid repository

test/dummyrepo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 978feacee2432e67051f2714ec7d28ad80e16908
1+
Subproject commit cb09e99e91d41705197e0fb60823fdc7df776691

test/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ reporter.run(
4040
'raw-error.js',
4141

4242
// TODO:
43-
'raw-revwalk.js'
43+
//'raw-revwalk.js',
4444

4545
// Convenience API
46-
//'convenience-repo.js'
46+
'convenience-repo.js'
4747
]
4848
);

util/hint-check.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var nodejshint = require( './nodejshint.js' ).test,
22

3-
files = [ 'lib/index.js', 'lib/ref.js', 'lib/repo.js', 'lib/error.js' ];
3+
files = [ 'lib/index.js', 'lib/ref.js', 'lib/repo.js', 'lib/error.js', 'lib/revwalk.js', 'lib/commit.js', 'lib/util.js', 'lib/oid.js', 'lib/sig.js' ];
44

55
nodejshint( files, function( failures ) {
66
if( !files.length ) {

0 commit comments

Comments
 (0)