on 3bb97fc help sign in
searx/Makefile
89 lines 2.1 kB history raw
1# -*- coding: utf-8; mode: makefile-gmake -*-
3export GIT_URL=https://github.com/asciimoo/searx
4export SEARX_URL=https://searx.me
5export DOCS_URL=https://asciimoo.github.io/searx
7PYOBJECTS = searx
8DOC = docs
9PY_SETUP_EXTRAS ?= \[test\]
11PYDIST=./dist/py
12PYBUILD=./build/py
14include utils/makefile.include
15include utils/makefile.python
16include utils/makefile.sphinx
18all: clean install
20PHONY += help
21help:
22 @echo ' test - run developer tests'
23 @echo ' docs - build documentation'
24 @echo ' docs-live - autobuild HTML documentation while editing'
25 @echo ' run - run developer instance'
26 @echo ' install - developer install (./local)'
27 @echo ' uninstall - uninstall (./local)'
28 @echo ' gh-pages - build docs & deploy on gh-pages branch'
29 @echo ' clean - drop builds and environments'
30 @echo ''
31 @$(MAKE) -s -f utils/makefile.include make-help
32 @echo ''
33 @$(MAKE) -s -f utils/makefile.python python-help
35PHONY += install
36install: pyenvinstall
38PHONY += uninstall
39uninstall: pyenvuninstall
41PHONY += clean
42clean: pyclean
43 $(call cmd,common_clean)
45PHONY += run
46run: pyenvinstall
47 $(Q) ( \
48 sed -i -e "s/debug : False/debug : True/g" ./searx/settings.yml ; \
49 sleep 2 ; \
50 xdg-open http://127.0.0.1:8888/ ; \
51 sleep 3 ; \
52 sed -i -e "s/debug : True/debug : False/g" ./searx/settings.yml ; \
53 ) &
54 $(PY_ENV)/bin/python ./searx/webapp.py
56# docs
57# ----
59PHONY += docs
60docs: pyenvinstall sphinx-doc
61 $(call cmd,sphinx,html,docs,docs)
63PHONY += docs-live
64docs-live: pyenvinstall sphinx-live
65 $(call cmd,sphinx_autobuild,html,docs,docs)
67$(GH_PAGES)::
68 @echo "doc available at --> $(DOCS_URL)"
70# test
71# ----
73PHONY += test test.pylint test.pep8 test.unit test.robot
75# TODO: balance linting with pylint
76test: test.pep8 test.unit test.robot
77 - make pylint
79test.pep8: pyenvinstall
80 $(PY_ENV_ACT); ./manage.sh pep8_check
82test.unit: pyenvinstall
83 $(PY_ENV_ACT); ./manage.sh unit_tests
85test.robot: pyenvinstall
86 $(PY_ENV_ACT); ./manage.sh install_geckodriver
87 $(PY_ENV_ACT); ./manage.sh robot_tests
89.PHONY: $(PHONY)