Created
September 28, 2012 01:31
-
-
Save thehydroimpulse/3797472 to your computer and use it in GitHub Desktop.
OS Check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ifneq (,$(findstring /cygdrive/,$(PATH))) | |
UNAME := Cygwin | |
else | |
ifneq (,$(findstring WINDOWS,$(PATH))) | |
UNAME := Windows | |
else | |
UNAME := $(shell uname -s) | |
endif | |
endif |
This is working for me:
PATH_SEP = $(shell node -e "console.log(require('path').sep)")
# darwin (mac), linux, win32 (windows)
OS = $(shell node -e "console.log(require('os').platform())")
install-dependencies:
ifeq (win32,$(OS))
$(shell $(DEPENDENCIES))
else
$(shell $(DEPENDENCIES))
endif
make install-dependencies
Oops, add this to the top too (below OS
):
DEPENDENCIES = bin$(PATH_SEP)dependencies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What about something like this: