summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2019-12-10 15:41:06 +0000
committerGitHub <noreply@github.com>2019-12-10 15:41:06 +0000
commit7fbb15e05070de26c3b5b1958a2c2a42208bbe8b (patch)
treef1350147393a2153246e76f5438613c2f3725c53 /Makefile
parentf34ac58752b3857468d01c79d7bc3409e8b03fe3 (diff)
parentf7a0510ac0e1853e3662b39254f3eb9be0efa2b0 (diff)
Merge branch 'master' into tidy-oscar
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000..77ffe489f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,62 @@
+# -*- coding: utf-8; mode: makefile-gmake -*-
+
+PYOBJECTS = searx
+PY_SETUP_EXTRAS ?= \[test\]
+
+include utils/makefile.include
+include utils/makefile.python
+
+all: clean install
+
+PHONY += help
+help:
+ @echo ' test - run developer tests'
+ @echo ' run - run developer instance'
+ @echo ' install - developer install (./local)'
+ @echo ' uninstall - uninstall (./local)'
+ @echo ''
+ @$(MAKE) -s -f utils/makefile.include make-help
+ @echo ''
+ @$(MAKE) -s -f utils/makefile.python python-help
+
+PHONY += install
+install: pyenvinstall
+
+PHONY += uninstall
+uninstall: pyenvuninstall
+
+PHONY += clean
+clean: pyclean
+ $(call cmd,common_clean)
+
+PHONY += run
+run: pyenvinstall
+ $(Q) ( \
+ sed -i -e "s/debug : False/debug : True/g" ./searx/settings.yml ; \
+ sleep 2 ; \
+ xdg-open http://127.0.0.1:8888/ ; \
+ sleep 3 ; \
+ sed -i -e "s/debug : True/debug : False/g" ./searx/settings.yml ; \
+ ) &
+ $(PY_ENV)/bin/python ./searx/webapp.py
+
+# test
+# ----
+
+PHONY += test test.pylint test.pep8 test.unit test.robot
+
+# TODO: balance linting with pylint
+test: test.pep8 test.unit test.robot
+ - make pylint
+
+test.pep8: pyenvinstall
+ $(PY_ENV_ACT); ./manage.sh pep8_check
+
+test.unit: pyenvinstall
+ $(PY_ENV_ACT); ./manage.sh unit_tests
+
+test.robot: pyenvinstall
+ $(PY_ENV_ACT); ./manage.sh install_geckodriver
+ $(PY_ENV_ACT); ./manage.sh robot_tests
+
+.PHONY: $(PHONY)