on 036d80e help sign in
searx/Makefile
107 lines 2.8 kB history raw
1# -*- coding: utf-8; mode: makefile-gmake -*-
2# SPDX-License-Identifier: AGPL-3.0-or-later
4.DEFAULT_GOAL=help
5export MTOOLS=./manage
7include utils/makefile.include
9all: clean install
11PHONY += help
13help:
14 @./manage --help
15 @echo '----'
16 @echo 'run - run developer instance'
17 @echo 'install - developer install of searx into virtualenv'
18 @echo 'uninstall - uninstall developer installation'
19 @echo 'clean - clean up working tree'
20 @echo 'search.checker - check search engines'
21 @echo 'test - run shell & CI tests'
22 @echo 'test.sh - test shell scripts'
23 @echo 'ci.test - run CI tests'
26PHONY += run
27run: install
28 $(Q) ( \
29 sleep 2 ; \
30 xdg-open http://127.0.0.1:8888/ ; \
31 ) &
32 SEARX_DEBUG=1 ./manage pyenv.cmd python ./searx/webapp.py
34PHONY += install uninstall
35install uninstall:
36 $(Q)./manage pyenv.$@
38PHONY += clean
39clean: py.clean docs.clean node.clean test.clean
40 $(Q)./manage build_msg CLEAN "common files"
41 $(Q)find . -name '*.orig' -exec rm -f {} +
42 $(Q)find . -name '*.rej' -exec rm -f {} +
43 $(Q)find . -name '*~' -exec rm -f {} +
44 $(Q)find . -name '*.bak' -exec rm -f {} +
46PHONY += search.checker search.checker.%
47search.checker: install
48 $(Q)./manage pyenv.cmd searx-checker -v
50search.checker.%: install
51 $(Q)./manage pyenv.cmd searx-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
53PHONY += ci.test test test.sh
54ci.test: test.pep8 test.pylint test.unit test.robot
55test: ci.test
56test.sh:
57 $(Q)shellcheck -x -s bash \
58 utils/brand.env \
59 ./manage \
60 utils/lib.sh \
61 utils/filtron.sh \
62 utils/searx.sh \
63 utils/morty.sh \
64 utils/lxc.sh \
65 utils/lxc-searx.env \
66 .config.sh
67 $(Q)./manage build_msg TEST "$@ OK"
70# wrap ./manage script
72MANAGE += buildenv
73MANAGE += babel.compile
74MANAGE += data.all data.languages data.useragents
75MANAGE += docs.html docs.live docs.gh-pages docs.prebuild docs.clean
76MANAGE += docker.build docker.push
77MANAGE += gecko.driver
78MANAGE += node.env node.clean
79MANAGE += py.build py.clean
80MANAGE += pyenv pyenv.install pyenv.uninstall
81MANAGE += pypi.upload pypi.upload.test
82MANAGE += test.pylint test.pep8 test.unit test.coverage test.robot test.clean
83MANAGE += themes.all themes.oscar themes.simple themes.bootstrap
85PHONY += $(MANAGE)
87$(MANAGE):
88 $(Q)$(MTOOLS) $@
90# deprecated
92PHONY += docs docs-clean docs-live docker themes
94docs: docs.html
95 $(Q)./manage build_msg WARN $@ is deprecated use docs.html
97docs-clean: docs.clean
98 $(Q)./manage build_msg WARN $@ is deprecated use docs.clean
100docs-live: docs.live
101 $(Q)./manage build_msg WARN $@ is deprecated use docs.live
103docker: docker.build
104 $(Q)./manage build_msg WARN $@ is deprecated use docker.build
106themes: themes.all
107 $(Q)./manage build_msg WARN $@ is deprecated use themes.all