2019-11-28 19:54:57 +01:00
|
|
|
# -*- coding: utf-8; mode: makefile-gmake -*-
|
2021-04-17 18:20:29 +02:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
2020-03-08 18:37:16 +01:00
|
|
|
.DEFAULT_GOAL=help
|
2021-04-17 18:20:29 +02:00
|
|
|
export MTOOLS=./manage
|
2019-11-28 19:54:57 +01:00
|
|
|
|
2020-03-15 17:01:36 +01:00
|
|
|
include utils/makefile.include
|
2019-12-04 16:48:36 +01:00
|
|
|
|
2019-11-28 19:54:57 +01:00
|
|
|
all: clean install
|
|
|
|
|
2021-04-17 18:20:29 +02:00
|
|
|
PHONY += help
|
2019-11-28 19:54:57 +01:00
|
|
|
|
2021-04-17 18:20:29 +02:00
|
|
|
help:
|
|
|
|
@./manage --help
|
|
|
|
@echo '----'
|
|
|
|
@echo 'run - run developer instance'
|
2021-10-01 09:48:53 +02:00
|
|
|
@echo 'install - developer install of SearxNG into virtualenv'
|
2021-04-17 18:20:29 +02:00
|
|
|
@echo 'uninstall - uninstall developer installation'
|
|
|
|
@echo 'clean - clean up working tree'
|
|
|
|
@echo 'search.checker - check search engines'
|
|
|
|
@echo 'test - run shell & CI tests'
|
2021-04-20 16:01:44 +02:00
|
|
|
@echo 'test.shell - test shell scripts'
|
2021-04-17 18:20:29 +02:00
|
|
|
@echo 'ci.test - run CI tests'
|
2019-11-28 19:54:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
PHONY += run
|
2021-04-17 18:20:29 +02:00
|
|
|
run: install
|
2021-12-29 21:28:25 +01:00
|
|
|
$(Q)./manage webapp.run
|
2020-03-25 16:38:52 +01:00
|
|
|
|
2021-04-17 18:20:29 +02:00
|
|
|
PHONY += install uninstall
|
|
|
|
install uninstall:
|
|
|
|
$(Q)./manage pyenv.$@
|
2020-03-25 16:38:52 +01:00
|
|
|
|
2021-04-17 18:20:29 +02:00
|
|
|
PHONY += clean
|
2021-11-14 18:10:14 +01:00
|
|
|
clean: py.clean docs.clean node.clean nvm.clean test.clean
|
2021-04-17 18:20:29 +02:00
|
|
|
$(Q)./manage build_msg CLEAN "common files"
|
|
|
|
$(Q)find . -name '*.orig' -exec rm -f {} +
|
|
|
|
$(Q)find . -name '*.rej' -exec rm -f {} +
|
|
|
|
$(Q)find . -name '*~' -exec rm -f {} +
|
|
|
|
$(Q)find . -name '*.bak' -exec rm -f {} +
|
|
|
|
|
2021-07-03 18:25:46 +02:00
|
|
|
lxc.clean:
|
|
|
|
$(Q)rm -rf lxc-env
|
|
|
|
|
2021-04-17 18:20:29 +02:00
|
|
|
PHONY += search.checker search.checker.%
|
|
|
|
search.checker: install
|
|
|
|
$(Q)./manage pyenv.cmd searx-checker -v
|
|
|
|
|
|
|
|
search.checker.%: install
|
|
|
|
$(Q)./manage pyenv.cmd searx-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
|
|
|
|
|
2021-04-20 16:01:44 +02:00
|
|
|
PHONY += test ci.test test.shell
|
2022-03-25 10:10:13 +01:00
|
|
|
ci.test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test.pybabel
|
2022-01-20 08:26:16 +01:00
|
|
|
test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test.shell
|
2021-04-20 16:01:44 +02:00
|
|
|
test.shell:
|
2021-05-10 11:26:56 +02:00
|
|
|
$(Q)shellcheck -x -s dash \
|
|
|
|
dockerfiles/docker-entrypoint.sh
|
2021-04-17 18:20:29 +02:00
|
|
|
$(Q)shellcheck -x -s bash \
|
2024-01-07 18:33:34 +01:00
|
|
|
utils/brand.sh \
|
2021-06-24 15:15:34 +02:00
|
|
|
$(MTOOLS) \
|
2021-04-17 18:20:29 +02:00
|
|
|
utils/lib.sh \
|
2023-08-06 16:39:00 +02:00
|
|
|
utils/lib_sxng*.sh \
|
2021-11-16 18:00:47 +01:00
|
|
|
utils/lib_go.sh \
|
2023-08-06 16:39:00 +02:00
|
|
|
utils/lib_nvm.sh \
|
2021-12-28 16:56:52 +01:00
|
|
|
utils/lib_redis.sh \
|
2022-05-27 18:43:14 +02:00
|
|
|
utils/searxng.sh \
|
2022-01-03 13:51:35 +01:00
|
|
|
utils/lxc.sh \
|
2023-08-06 16:39:00 +02:00
|
|
|
utils/lxc-searxng.env \
|
|
|
|
utils/searx.sh \
|
|
|
|
utils/filtron.sh \
|
|
|
|
utils/morty.sh
|
2021-06-24 15:15:34 +02:00
|
|
|
$(Q)$(MTOOLS) build_msg TEST "$@ OK"
|
2020-03-26 18:41:45 +01:00
|
|
|
|
2019-11-28 20:05:29 +01:00
|
|
|
|
2021-04-17 18:20:29 +02:00
|
|
|
# wrap ./manage script
|
2020-01-08 18:09:36 +01:00
|
|
|
|
2021-08-16 11:30:53 +02:00
|
|
|
MANAGE += weblate.translations.commit weblate.push.translations
|
2023-04-04 05:02:01 +02:00
|
|
|
MANAGE += data.all data.traits data.useragents
|
2021-04-17 18:20:29 +02:00
|
|
|
MANAGE += docs.html docs.live docs.gh-pages docs.prebuild docs.clean
|
2021-04-24 08:53:12 +02:00
|
|
|
MANAGE += docker.build docker.push docker.buildx
|
2021-04-17 18:20:29 +02:00
|
|
|
MANAGE += gecko.driver
|
2022-09-28 12:50:23 +02:00
|
|
|
MANAGE += node.env node.env.dev node.clean
|
2021-04-17 18:20:29 +02:00
|
|
|
MANAGE += py.build py.clean
|
|
|
|
MANAGE += pyenv pyenv.install pyenv.uninstall
|
2021-12-24 09:49:45 +01:00
|
|
|
MANAGE += format.python
|
2022-03-25 10:10:13 +01:00
|
|
|
MANAGE += test.yamllint test.pylint test.pyright test.black test.pybabel test.unit test.coverage test.robot test.rst test.clean
|
2022-04-30 08:01:53 +02:00
|
|
|
MANAGE += themes.all themes.simple themes.simple.test pygments.less
|
2021-06-26 08:46:20 +02:00
|
|
|
MANAGE += static.build.commit static.build.drop static.build.restore
|
2021-11-14 18:10:14 +01:00
|
|
|
MANAGE += nvm.install nvm.clean nvm.status nvm.nodejs
|
2019-11-28 20:05:29 +01:00
|
|
|
|
2021-04-17 18:20:29 +02:00
|
|
|
PHONY += $(MANAGE)
|
2020-03-26 18:41:45 +01:00
|
|
|
|
2021-04-17 18:20:29 +02:00
|
|
|
$(MANAGE):
|
|
|
|
$(Q)$(MTOOLS) $@
|
2020-03-26 18:41:45 +01:00
|
|
|
|
2021-11-17 08:43:18 +01:00
|
|
|
# short hands of selected targets
|
2020-03-26 18:41:45 +01:00
|
|
|
|
2021-11-17 08:43:18 +01:00
|
|
|
PHONY += docs docker themes
|
2019-11-28 20:05:29 +01:00
|
|
|
|
2021-04-17 18:20:29 +02:00
|
|
|
docs: docs.html
|
|
|
|
docker: docker.build
|
|
|
|
themes: themes.all
|