@@ -1,16 +1,20 @@
11# -*- coding: utf-8; mode: makefile-gmake -*-
22
33PYOBJECTS = searx
4+DOC = docs
45PY_SETUP_EXTRAS ?= \[test\]
56
67include utils/makefile.include
78include utils/makefile.python
9+include utils/makefile.sphinx
810
911all: clean install
1012
1113PHONY += help
1214help:
1315 @echo ' test - run developer tests'
16+ @echo ' docs - build documentation'
17+ @echo ' docs-live - autobuild HTML documentation while editing'
1418 @echo ' run - run developer instance'
1519 @echo ' install - developer install (./local)'
1620 @echo ' uninstall - uninstall (./local)'
@@ -40,6 +44,18 @@ run: pyenvinstall
4044 ) &
4145 $(PY_ENV)/bin/python ./searx/webapp.py
4246
47+# docs
48+# ----
49+
50+PHONY += docs
51+docs: pyenvinstall sphinx-doc
52+ $(call cmd,sphinx,html,docs,docs)
53+
54+PHONY += docs-live
55+docs-live: pyenvinstall sphinx-live
56+ $(call cmd,sphinx_autobuild,html,docs,docs)
57+
58+
4359# test
4460# ----
4561