From 75a9bfbaad26354d83f8ee2b413fd0b61a5b8dda Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Wed, 19 Feb 2014 10:03:57 +0100 Subject: [PATCH] Use "nodejs"/"node" from PATH. --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 851df34c..870a5f3a 100644 --- a/Makefile +++ b/Makefile @@ -38,11 +38,13 @@ DIST := $(CURDIR)/dist_$(BUILD_ARCH) DIST_SRC := $(DIST)/src DIST_BIN := $(DIST)/bin -NODEJS_BIN_EXISTS := $(shell [ -x /usr/bin/nodejs ] && echo 1 || echo 0) -ifeq ($(NODEJS_BIN_EXISTS), 1) - NODEJS_BIN := /usr/bin/nodejs -else - NODEJS_BIN := /usr/bin/node +NODEJS_BIN := $(shell which nodejs) +ifeq ("$(NODEJS_BIN)", "") + NODEJS_BIN := $(shell which node) +endif +NODEJS_BIN_EXISTS := $(shell [ -x "$(NODEJS_BIN)" ] && echo 1 || echo 0) +ifneq ($(NODEJS_BIN_EXISTS), 1) + $(error "Can't find node.js runtime, please install / check your PATH") endif build: get binary styles javascript