ref: master
./Makefile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
__NAME__ = umbo.css __MINIFIED_NAME__=umbo.min.css source = src/normalize.css \ src/foundation.css \ src/grid.css \ src/forms.css \ src/buttons.css all: $(__NAME__) $(__NAME__): @printf 'CC -> \t$(source)\n' cat $(source) > $@ cp $@ example/ minify: cp $(__NAME__) $(__MINIFIED_NAME__) @# remove css comments sed -r ':a; s%(.*)/\*.*\*/%\1%; ta; /\/\*/ !b; N; ba' -i $(__MINIFIED_NAME__) @# remove leading spaces and tabs sed 's/^\s*//' -i $(__MINIFIED_NAME__) @# remove trailing spaces, tabs, and newline sed 's/\s*$$//' -i $(__MINIFIED_NAME__) @# remove newline tr --delete '\n' < $(__MINIFIED_NAME__) > tmp.css mv tmp.css $(__MINIFIED_NAME__) cp $(__MINIFIED_NAME__) example/ clean: rm -rf $(__NAME__) example/$(__NAME__) $(__MINIFIED_NAME__) example/$(__MINIFIED_NAME__) |