Add the banner for OrgCamp Paris 2011
[Worg.git] / code / org-info-js / Makefile
blob2ca274327f42d9f8ed9ed5ca765a8d3046140f75
1 YUI=~/bin/yuicompressor-2.4.2.jar
3 MINIFY_OTPIONS= --preserve-semi --line-break 80
5 VERSION = `grep -e '\* Version: *[0-9.]' org-info-src.js | cut -sd ':' -f 2-`
6 TMPv = tmp-version.js
7 TMPs = tmp-min.js
9 all: minify
12 minify: version sed.txt
13 @if [ -f $(TMPv) ] && [ -f $(TMPs) ]; then \
14 sed -f sed.txt $(TMPv) > $(TMPs); \
15 java -jar $(YUI) $(MINIFY_OTPIONS) $(TMPs) > org-info.js; \
16 rm $(TMPv); \
17 rm $(TMPs); \
18 echo "org-info.js successfully built."; \
19 else \
20 echo "Failed to build. $(TMPv) and/or $(TMPs) are missing!"; \
23 version:
24 @if [ -f $(TMPv) ] || [ -f $(TMPs) ]; then \
25 echo "$(TMPv) and/or $(TMPs) exist. Please remove them or adjust the Makefile!"; \
26 else \
27 sed -e "s/###VERSION###/$(VERSION)/g" org-info-src.js > $(TMPv); \
28 touch $(TMPs); \
31 clean:
32 @rm -f $(TMPv) $(TMPs)
33 @echo "Temporary files removed."