Skip to content
Browse files

GNUMAKEFILE wrapper added

  • Loading branch information...
1 parent dc1d796 commit bfcf366950e050409f71415ed44e329134080cf1 @narqo narqo committed Nov 8, 2012
Showing with 29 additions and 0 deletions.
  1. +29 −0 GNUmakefile
View
29 GNUmakefile
@@ -0,0 +1,29 @@
+.DEFAULT_GOAL :=
+
+NODE_MODULES := ./node_modules/
+
+BEM := $(NODE_MODULES).bin/bem
+NPM := npm
+
+ifneq (,$(findstring B,$(MAKEFLAGS)))
+ BEM_FLAGS := --force
+endif
+
+all:: $(BEM) server
+
+%:: $(BEM)
+ $(if $(findstring GNUmakefile,$@),,$(BEM) make $@ $(BEM_FLAGS))
+
+.PHONY: server
+server:: $(BEM)
+ @$(BEM) server
+
+$(BEM):: $(NODE_MODULES)
+
+$(NODE_MODULES)::
+ $(debug ---> Updating npm dependencies)
+ @$(NPM) install
+
+.PHONY: clean
+clean::
+ $(BEM) make -m clean

0 comments on commit bfcf366

Please sign in to comment.
Something went wrong with that request. Please try again.