From 631e2e85e171a2825bebaaeecb916cb92b343ec4 Mon Sep 17 00:00:00 2001 From: agolybev Date: Thu, 24 Mar 2016 12:48:39 +0300 Subject: [PATCH] Added Makefile --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..e1612d1b00 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +GRUNT = grunt +GRUNT_FLAGS = --no-color -v + +OUTPUT_DIR = build +OUTPUT = $(OUTPUT_DIR) + +WEBAPPS_DIR = web-apps +WEBAPPS = $(OUTPUT)/$(WEBAPPS_DIR) +GRUNT_FILES = web-apps/sdkjs/build/deploy/Gruntfile.js.out web-apps/build/Gruntfile.js.out + +all: $(WEBAPPS) + +$(WEBAPPS): $(GRUNT_FILES) + mkdir -p $(OUTPUT)/$(WEBAPPS_DIR) && \ + cp -r -t $(OUTPUT)/$(WEBAPPS_DIR) $(WEBAPPS_DIR)/deploy/** + +$(GRUNT_FILES): + cd $(@D) && \ + npm install && \ + $(GRUNT) $(GRUNT_FLAGS) + echo "Done" > $@ + +clean: + rm -f $(GRUNT_FILES) \ No newline at end of file