2 # get Makefile directory name: http://stackoverflow.com/a/5982798/376773
3 THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
4 THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
7 BIN := $(THIS_DIR)/node_modules/.bin
10 NODE ?= $(shell which node)
11 YARN ?= $(shell which yarn)
12 PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
13 BROWSERIFY ?= $(NODE) $(BIN)/browserify
25 dist/debug.js: node_modules browser.js debug.js dist
33 node_modules: package.json
34 @NODE_ENV= $(PKG) install
37 .PHONY: all install clean distclean