Permalink
Browse files

Make the makefile cross-platform

You'll need gnumake installed to be able to run "make"
  • Loading branch information...
1 parent ad5acbb commit 24259edd898847d7fe645236581a2c1d460224bd @CL0SeY CL0SeY committed Oct 6, 2014
Showing with 17 additions and 7 deletions.
  1. +17 −7 Makefile
View
@@ -4,13 +4,23 @@ TESTS += test/package.test.js
TESTS += test/resource.test.js
test:
- # Why /usr/bin/env? Because I want stuff like nvm versions to take precedence
- /usr/bin/env node ./node_modules/.bin/mocha \
- --ui exports \
- --reporter spec \
- --slow 2000ms \
- --bail \
- $(TESTS)
+ ifeq ($(OS),Windows_NT)
+ # There is no /usr/bin/env on Windows.
+ node_modules\\.bin\\mocha.cmd \
+ --ui exports \
+ --reporter spec \
+ --slow 2000ms \
+ --bail \
+ $(TESTS)
+ else
+ # Why /usr/bin/env? Because I want stuff like nvm versions to take precedence
+ /usr/bin/env node ./node_modules/.bin/mocha \
+ --ui exports \
+ --reporter spec \
+ --slow 2000ms \
+ --bail \
+ $(TESTS)
+ endif
lint:
jshint . --exclude="**/node_modules"

0 comments on commit 24259ed

Please sign in to comment.