VERSION = $(shell tr -d '\012' < VERSION)
HANDLEBARS = ../test/node_modules/.bin/handlebars
-YUI_COMPRESSOR = $(shell which yui-compressor ../test/bin/yui-compressor | head -1)
+UGLIFYJS = ../test/node_modules/.bin/uglifyjs
COMPONENTS = mkws-handlebars.js \
mkws-core.js \
mv -f $@.tmp $@
%.min.js: %.js
- ${YUI_COMPRESSOR} $? > $@.tmp
+ ${UGLIFYJS} $? > $@.tmp
mv -f $@.tmp $@
$(DEST)/${HANDLEBARS_FILE}:
curl -sSf "${PP2_URL}" -o $@.tmp
mv -f $@.tmp $@
-release: $(RELEASABLE)
- @if [ -f ${DEST}/releases/mkws-$(VERSION).js ]; then \
+$(DEST)/NEWS: NEWS
+ rm -f $@
+ cp $? $@
+ chmod 444 $@
+
+$(DEST)/VERSION: VERSION
+ rm -f $@
+ cp $? $@
+ chmod 444 $@
+
+release: $(INSTALLED_RELEASABLE)
+ if [ -f ${DEST}/releases/mkws-$(VERSION).js ]; then \
echo "*** There is already a release $(VERSION)"; \
else \
cp -p $(DEST)/mkws.js ${DEST}/releases/mkws-$(VERSION).js; \
cp -p $(DEST)/mkws.min.js ${DEST}/releases/mkws-$(VERSION).min.js; \
cp -p $(DEST)/mkws-complete.js ${DEST}/releases/mkws-complete-$(VERSION).js; \
cp -p $(DEST)/mkws-complete.min.js ${DEST}/releases/mkws-complete-$(VERSION).min.js; \
+ cp -p $(DEST)/mkws.css ${DEST}/releases/mkws-$(VERSION).css; \
echo "Made release $(VERSION)"; \
fi
# Checks that the JavaScript can be parsed
syntax-check: $(DEST)/mkws.js
- ${YUI_COMPRESSOR} $(DEST)/mkws.js >/dev/null
+ ${UGLIFYJS} $(DEST)/mkws.js >/dev/null
# Emits a list of <script> elements to include in HTML applications
html-includes: