summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 27 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 5a47129e4..63e7e97f0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,6 @@
# -*- coding: utf-8; mode: makefile-gmake -*-
-export GIT_URL=https://github.com/asciimoo/searx
-export SEARX_URL=https://searx.me
-export DOCS_URL=https://asciimoo.github.io/searx
+include ./.config.mk
PYOBJECTS = searx
DOC = docs
@@ -29,6 +27,11 @@ help:
@echo ' clean - drop builds and environments'
@echo ' project - re-build generic files of the searx project'
@echo ''
+ @echo 'environment'
+ @echo ' SEARX_URL = $(SEARX_URL)'
+ @echo ' GIT_URL = $(GIT_URL)'
+ @echo ' DOCS_URL = $(DOCS_URL)'
+ @echo ''
@$(MAKE) -s -f utils/makefile.include make-help
@echo ''
@$(MAKE) -s -f utils/makefile.python python-help
@@ -58,13 +61,21 @@ run: pyenvinstall
# ----
PHONY += docs
-docs: pyenvinstall sphinx-doc
+
+docs: pyenvinstall sphinx-doc prebuild-includes
$(call cmd,sphinx,html,docs,docs)
PHONY += docs-live
-docs-live: pyenvinstall sphinx-live
+docs-live: pyenvinstall sphinx-live prebuild-includes
$(call cmd,sphinx_autobuild,html,docs,docs)
+prebuild-includes:
+ @mkdir -p $(DOCS_BUILD)/includes
+ @./utils/searx.sh doc | cat > $(DOCS_BUILD)/includes/searx.rst
+ @./utils/filtron.sh doc | cat > $(DOCS_BUILD)/includes/filtron.rst
+ @./utils/morty.sh doc | cat > $(DOCS_BUILD)/includes/morty.rst
+
+
$(GH_PAGES)::
@echo "doc available at --> $(DOCS_URL)"
@@ -83,15 +94,25 @@ searx/data/engines_languages.json: pyenvinstall
# test
# ----
-PHONY += test test.pylint test.pep8 test.unit test.robot
+PHONY += test test.sh test.pylint test.pep8 test.unit test.robot
test: test.pylint test.pep8 test.unit test.robot
# TODO: balance linting with pylint
+
test.pylint: pyenvinstall
$(call cmd,pylint,searx/preferences.py)
$(call cmd,pylint,searx/testing.py)
+test.sh:
+ shellcheck -x utils/lib.sh
+ shellcheck -x utils/filtron.sh
+ shellcheck -x utils/searx.sh
+ shellcheck -x utils/morty.sh
+ shellcheck -x utils/lxc.sh
+ shellcheck -x utils/lxc.env
+ shellcheck -x .config.sh
+
test.pep8: pyenvinstall
$(PY_ENV_ACT); ./manage.sh pep8_check