rewrite Makefile

pull/80/merge
Martin Zimmermann 10 years ago
parent b19084b3e2
commit 5df4b40a1f

@ -1,22 +1,40 @@
all: css js
ISSO_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
RST := $(shell find docs/ -type f -name '*.rst')
MAN := man/man1/isso.1 man/man5/isso.conf.5
WWW := docs/index.html docs/isso.example.cfg $(wildcard docs/_static/*)
CSS := docs/_static/css/site.css
all: man js site
init:
(cd isso/js; bower install almond requirejs requirejs-text)
css:
scss isso/css/isso.scss isso/css/isso.css
isso/js/%.min.js: $(ISSO_SRC)
r.js -o isso/js/build.$*.js out=$@
isso/js/%.dev.js: $(ISSO_SRC)
r.js -o isso/js/build.$*.js optimize="none" out=$@
js:
r.js -o isso/js/build.embed.js
r.js -o isso/js/build.embed.js optimize="none" out="isso/js/embed.dev.js"
r.js -o isso/js/build.count.js
r.js -o isso/js/build.count.js optimize="none" out="isso/js/count.dev.js"
js: $(ISSO_DST)
site:
cd docs/ && sphinx-build -E -b dirhtml -a . _build
scss docs/_static/css/site.scss docs/_build/_static/css/site.css
man: $(RST)
sphinx-build -b man docs/ man/
${CSS}: docs/_static/css/site.scss
scss --no-cache $< $@
site: $(RST) $(WWW) $(CSS)
cd docs && sphinx-build -b dirhtml . _build/html
coverage:
nosetests --with-doctest --with-doctest-ignore-unicode --with-coverage \
--cover-package=isso --cover-html isso/ specs/
clean:
rm -f $(MAN) $(CSS) $(ISSO_DST)
.PHONY: clean site man init js

Loading…
Cancel
Save