summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-03-02 18:14:56 -0500
committerAlex Xu <alex_y_xu@yahoo.ca>2014-03-02 18:14:56 -0500
commit1596e91887b42816dae412c77e17d2979e2e4cd4 (patch)
tree21373acd6915784f4c28eacee505c833f1a04d8b /Makefile
parentad86bdc38b6cc17aa03f486df74e25e78d00498e (diff)
downloadhtml5ks-1596e91887b42816dae412c77e17d2979e2e4cd4.tar.xz
html5ks-1596e91887b42816dae412c77e17d2979e2e4cd4.zip
bleh
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 15 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 696fb2f..fd708a2 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ WEBPMUX ?= webpmux
CONVERT ?= convert
APNGASM ?= apngasm
NPM ?= npm
-UGLIFYJS ?= node_modules/.bin/uglifyjs
+UGLIFYJS := node_modules/.bin/uglifyjs
ifndef MINIMAL
ZOPFLIPNG ?= zopflipng
DEFLOPT ?= wine DeflOpt
@@ -150,35 +150,40 @@ JSDATA := www/js/play.js www/js/images.js
JS := $(JSLIBS) $(MYJS) $(JSDATA)
JSOUT := www/js/all.min.js
-Modernizr/dist/modernizr-build.js: Modernizr
- ln -fs ../../config-all.json Modernizr/lib/config-all.json
- cd Modernizr && $(NPM) update && node_modules/.bin/grunt build
+Modernizr/dist/modernizr-build.js: Modernizr config-all.json
+ ln -fs ../../config-all.json "$<"/lib/config-all.json
+ cd "$<" && $(NPM) update && node_modules/.bin/grunt build
when/build/when.js: when
export PYTHON=python2; cd when && $(NPM) update && $(NPM) run browserify-debug
js: $(JSOUT)
-$(JSOUT): $(JS)
# note that packr doesn't actually work
+ifndef PACKR
+ifndef CLOSURE_COMPILER
+$(JSOUT): $(JS) $(UGLIFYJS)
+else
+$(JSOUT): $(JS)
+endif
+endif
ifdef PACKR
$(PACKR) $^ -o "$@"
else
ifdef CLOSURE_COMPILER
$(CLOSURE_COMPILER) --compilation_level SIMPLE_OPTIMIZATIONS --create_source_map "$@".map --js $(subst $(SPACE), --js ,$^) --js_output_file "$@"
else
- $(NPM) update
$(UGLIFYJS) $^ -o "$@" --source-map "$@".map --source-map-url ./all.min.js.map --screw-ie8 -p 2 -m -c unsafe=true,drop_debugger=false
endif
endif
-# === MISC ===
+$(UGLIFYJS): package.json
+ $(NPM) update
-clean:
- $(RM) $(CVIDEO) $(CAUDIO) $(CIMAGE)
+# === MISC ===
jshint: $(MYJS)
- jshint $^
+ jshint --show-non-errors $^
space:
$(RM) -r $(DUMP)/font