Skip to content

Commit

Permalink
Detect yui-compressor executable in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed Nov 16, 2015
1 parent e8d9d46 commit 6fa1073
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
ifneq (, $(shell which yui-compressor))
YUICOMPRESSOR := 'yui-compressor'
else ifneq (, $(shell which yuicompressor))
YUICOMPRESSOR := 'yuicompressor'
else
$(error "No YUI Compressor found!")
endif

all: min/wmaglobe3d.min.js min/utils.min.js min/wmajt_dev.min.js min/wmajt.min.js min/wmacore_dev.min.js min/wmacore.min.js

min/wmaglobe3d.min.js: wmaglobe3d.js
yui-compressor wmaglobe3d.js > min/wmaglobe3d.min.js
$(YUICOMPRESSOR) wmaglobe3d.js > min/wmaglobe3d.min.js

min/utils.min.js: utils.js
yui-compressor utils.js > min/utils.min.js
$(YUICOMPRESSOR) utils.js > min/utils.min.js

min/wmajt_dev.min.js: wmajt_dev.js
yui-compressor wmajt_dev.js > min/wmajt_dev.min.js
$(YUICOMPRESSOR) wmajt_dev.js > min/wmajt_dev.min.js

min/wmajt.min.js: wmajt.js
yui-compressor wmajt.js > min/wmajt.min.js
$(YUICOMPRESSOR) wmajt.js > min/wmajt.min.js

min/wmacore_dev.min.js: wmacore_dev.js
yui-compressor wmacore_dev.js > min/wmacore_dev.min.js
$(YUICOMPRESSOR) wmacore_dev.js > min/wmacore_dev.min.js

min/wmacore.min.js: wmacore.js
yui-compressor wmacore.js > min/wmacore.min.js

$(YUICOMPRESSOR) wmacore.js > min/wmacore.min.js

0 comments on commit 6fa1073

Please sign in to comment.