improve site targets
This commit is contained in:
parent
460db1dd1e
commit
119ceb0035
33
Makefile
33
Makefile
@ -9,11 +9,21 @@ ISSO_CSS := isso/css/isso.css
|
||||
|
||||
ISSO_PY_SRC := $(shell git ls-files | grep .py)
|
||||
|
||||
RST := $(shell find docs/ -type f -name '*.rst')
|
||||
MAN := man/man1/isso.1 man/man5/isso.conf.5
|
||||
DOCS_RST_SRC := $(shell find docs/ -type f -name '*.rst') \
|
||||
$(wildcard docs/_isso/*) \
|
||||
docs/index.html docs/conf.py docs/docutils.conf \
|
||||
share/isso.conf
|
||||
|
||||
WWW := docs/index.html share/isso.conf $(wildcard docs/_static/*)
|
||||
CSS := docs/_static/css/site.css
|
||||
DOCS_CSS_SRC := docs/_static/css/site.scss
|
||||
|
||||
DOCS_CSS_DEP := $(shell find docs/_static/css/neat -type f) \
|
||||
$(shell find docs/_static/css/bourbon -type f)
|
||||
|
||||
DOCS_CSS_DST := docs/_static/css/site.css
|
||||
|
||||
DOCS_MAN_DST := man/man1/isso.1 man/man5/isso.conf.5
|
||||
|
||||
DOCS_HTML_DST := docs/_build/html
|
||||
|
||||
all: man js site
|
||||
|
||||
@ -28,16 +38,18 @@ isso/js/%.dev.js: $(ISSO_JS_SRC) $(ISSO_CSS)
|
||||
|
||||
js: $(ISSO_JS_DST)
|
||||
|
||||
man: $(RST)
|
||||
man: $(DOCS_RST_SRC)
|
||||
sphinx-build -b man docs/ man/
|
||||
mv man/isso.1 man/man1/isso.1
|
||||
mv man/isso.conf.5 man/man5/isso.conf.5
|
||||
|
||||
${CSS}: docs/_static/css/site.scss
|
||||
scss --no-cache $< $@
|
||||
${DOCS_CSS_DST}: $(DOCS_CSS_SRC) $(DOCS_CSS_DEP)
|
||||
scss --no-cache $(DOCS_CSS_SRC) $@
|
||||
|
||||
site: $(RST) $(WWW) $(CSS)
|
||||
cd docs && sphinx-build -b dirhtml . _build/html
|
||||
${DOCS_HTML_DST}: $(DOCS_RST_SRC) $(DOCS_CSS_DST)
|
||||
sphinx-build -b dirhtml docs/ $@
|
||||
|
||||
site: $(DOCS_HTML_DST)
|
||||
|
||||
coverage: $(ISSO_PY_SRC)
|
||||
nosetests --with-doctest --with-coverage --cover-package=isso --cover-html isso/
|
||||
@ -46,7 +58,8 @@ test: $($ISSO_PY_SRC)
|
||||
python setup.py nosetests
|
||||
|
||||
clean:
|
||||
rm -f $(MAN) $(CSS) $(ISSO_JS_DST)
|
||||
rm -f $(DOCS_MAN_DST) $(DOCS_CSS_DST) $(ISSO_JS_DST)
|
||||
rm -rf $(DOCS_HTML_DST)
|
||||
|
||||
.PHONY: clean site man init js coverage test
|
||||
|
||||
|
@ -158,7 +158,7 @@ html_static_path = ['_static']
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
html_additional_pages = {"index": "index.html"}
|
||||
html_additional_pages = {"index": "docs/index.html"}
|
||||
|
||||
# If false, no module index is generated.
|
||||
html_domain_indices = False
|
||||
|
Loading…
Reference in New Issue
Block a user