add target to generate Isso's CSS

This commit is contained in:
Martin Zimmermann 2014-03-20 11:19:37 +01:00
parent 2c2c911ba4
commit e75fa4b7e1

View File

@ -1,5 +1,9 @@
ISSO_SRC := $(shell find isso/js/app -type f) $(shell ls isso/js/*.js | grep -vE "(min|dev)") ISSO_JS_SRC := $(shell find isso/js/app -type f) $(shell ls isso/js/*.js | grep -vE "(min|dev)")
ISSO_DST := isso/js/embed.min.js isso/js/embed.dev.js isso/js/count.min.js isso/js/count.dev.js ISSO_JS_DST := isso/js/embed.min.js isso/js/embed.dev.js isso/js/count.min.js isso/js/count.dev.js
ISSO_CSS_DST := isso/css/isso.css
ISSO_CSS_SRC := isso/css/isso.scss
ISSO_CSS_SRC_DEPS := $(shell find isso/css -type f | grep .scss)
RST := $(shell find docs/ -type f -name '*.rst') RST := $(shell find docs/ -type f -name '*.rst')
MAN := man/man1/isso.1 man/man5/isso.conf.5 MAN := man/man1/isso.1 man/man5/isso.conf.5
@ -12,13 +16,17 @@ all: man js site
init: init:
(cd isso/js; bower install almond requirejs requirejs-text) (cd isso/js; bower install almond requirejs requirejs-text)
isso/js/%.min.js: $(ISSO_SRC) ${ISSO_CSS_DST}: $(ISSO_CSS_SRC_DEPS)
scss --no-cache $(ISSO_CSS_SRC) $@
isso/js/%.min.js: $(ISSO_JS_SRC) $(ISSO_CSS_DST)
r.js -o isso/js/build.$*.js out=$@ r.js -o isso/js/build.$*.js out=$@
isso/js/%.dev.js: $(ISSO_SRC) isso/js/%.dev.js: $(ISSO_JS_SRC) $(ISSO_CSS_DST)
r.js -o isso/js/build.$*.js optimize="none" out=$@ r.js -o isso/js/build.$*.js optimize="none" out=$@
js: $(ISSO_DST) js: $(ISSO_JS_DST)
css: $(ISSO_CSS_DST)
man: $(RST) man: $(RST)
sphinx-build -b man docs/ man/ sphinx-build -b man docs/ man/
@ -34,7 +42,7 @@ coverage:
--cover-package=isso --cover-html isso/ specs/ --cover-package=isso --cover-html isso/ specs/
clean: clean:
rm -f $(MAN) $(CSS) $(ISSO_DST) rm -f $(MAN) $(CSS) $(ISSO_JS_DST) $(ISSO_CSS_DST)
.PHONY: clean site man init js .PHONY: clean site man init js css