Skip to content

Commit 2d5239d

Browse files
committed
Modified npm package to not build native bson extension for windows
1 parent a27cb54 commit 2d5239d

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build_native:
99

1010
clean_native:
1111
$(MAKE) -C ./external-libs/bson clean
12-
12+
1313
test: build_native test_integration_pure test_integration_native
1414
@$(NODE) spec/spec.node.js
1515

@@ -19,4 +19,8 @@ test_integration_pure:
1919
test_integration_native:
2020
@$(NODE) integration/integration_tests.js native $(name)
2121

22+
clean:
23+
rm ./external-libs/bson/bson.node
24+
rm -r ./external-libs/bson/build
25+
2226
.PHONY: total

install.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
if [ $number = `uname -o` = "Cygwin" ]
3+
then
4+
echo "Not building native library for cygwin"
5+
else
6+
echo "Not building native library for cygwin"
7+
make total
8+
fi

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
, "main": "./lib/mongodb/index"
2121
, "directories" : { "lib" : "./lib/mongodb" }
2222
, "engines" : { "node" : ">=0.4.0" }
23-
, "scripts": { "install": "make total" }
23+
, "scripts": { "install" : "./install.sh" }
2424
, "licenses" : [ { "type" : "Apache License, Version 2.0"
2525
, "url" : "http://www.apache.org/licenses/LICENSE-2.0" } ]
2626
}

0 commit comments

Comments
 (0)