diff options
Diffstat (limited to 'common.mk')
-rw-r--r-- | common.mk | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -1,17 +1,13 @@ M4FLAGS += -I.. -TO_SINGLE_LINE:=tr '\n' ' ' -REMOVE_DOUBLE_SLASH_COMMENTS:=sed 's/\/\/.*$$//g' -REMOVE_SLASH_STAR_COMMENTS:=sed 's/\/\*[^\*]*\*\///g' -REMOVE_TABS:=sed 's/\t//g' -REMOVE_WHITESPACE:=sed 's/ */ /g' -TRIM_WHITESPACE:=sed -E 's/^\s*(.*)\s+$$/\1/g' +JSMIN ?= ../scripts/js2min +CSSMIN ?= ../scripts/css2min %.min.js: %.js - cat $< | $(REMOVE_DOUBLE_SLASH_COMMENTS) | $(TO_SINGLE_LINE) | $(REMOVE_SLASH_STAR_COMMENTS) | $(REMOVE_TABS) | $(REMOVE_WHITESPACE) | $(TRIM_WHITESPACE) > $@ + $(JSMIN) < $< > $@ %.min.css: %.css - cat $< | $(TO_SINGLE_LINE) | $(REMOVE_SLASH_STAR_COMMENTS) | $(REMOVE_TABS) | $(REMOVE_WHITESPACE) | $(TRIM_WHITESPACE) > $@ + $(CSSMIN) < $< > $@ %: %.m4 m4 $(M4FLAGS) $< > $@ |