CLOSURE = closure-compiler --language_in ECMASCRIPT5
+YUICOMPRESSOR = yuicompressor
all:
JS_FILES = $(shell grep '[.]js$$' manifest.files)
js-min: $(JS_FILES:=.min)
-check: js-min
+%.css.min: %.css
+ $(YUICOMPRESSOR) $< > $@
-.PHONY: all clean check js-min
+CSS_FILES = $(shell grep '[.]css$$' manifest.files)
+css-min: $(CSS_FILES:=.min)
+
+check: css-min js-min
+
+dist:
+ ./makedist.sh
+
+.PHONY: all clean check css-min dist js-min
done < <(sed 's:#.*::' manifest.files)
cp Makefile manifest.files manifest.json "${P}/"
-make -C "${P}" -j js-min
+make -C "${P}" -j {css,js}-min
while read line ; do
mv "${line}.min" "${line}"
-done < <(find "${P}" -name '*.js')
+done < <(find "${P}" -name '*.js' -o -name '*.css')
rm "${P}"/{manifest.files,Makefile}
sed -i \
"${P}/manifest.json"
zip="${P}.zip"
+rm -f "${zip}"
zip -r "${zip}" "${P}"
rm -rf "${P}"
du -b "${zip}"