| 
									
										
										
										
											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 | 
					
						
							| 
									
										
										
										
											2019-11-28 19:54:57 +01:00
										 |  |  | 	$(Q) ( \
 | 
					
						
							|  |  |  | 	sleep 2 ; \
 | 
					
						
							|  |  |  | 	xdg-open http://127.0.0.1:8888/ ; \
 | 
					
						
							|  |  |  | 	) & | 
					
						
							| 
									
										
										
										
											2021-10-02 12:21:02 +02:00
										 |  |  | 	SEARXNG_DEBUG=1 ./manage pyenv.cmd python -m searx.webapp | 
					
						
							| 
									
										
										
										
											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 | 
					
						
							|  |  |  | clean: py.clean docs.clean node.clean test.clean | 
					
						
							|  |  |  | 	$(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 | 
					
						
							| 
									
										
										
										
											2021-05-27 21:22:00 +02:00
										 |  |  | ci.test: test.yamllint test.pep8 test.pylint test.unit test.robot | 
					
						
							|  |  |  | test:    test.yamllint test.pep8 test.pylint test.unit test.robot 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 \
 | 
					
						
							|  |  |  | 		utils/brand.env \
 | 
					
						
							| 
									
										
										
										
											2021-06-24 15:15:34 +02:00
										 |  |  | 		$(MTOOLS) \
 | 
					
						
							| 
									
										
										
										
											2021-04-17 18:20:29 +02:00
										 |  |  | 		utils/lib.sh \
 | 
					
						
							| 
									
										
										
										
											2021-06-29 19:01:07 +02:00
										 |  |  | 		utils/lib_install.sh \
 | 
					
						
							| 
									
										
										
										
											2021-06-26 08:46:20 +02:00
										 |  |  | 		utils/lib_static.sh \
 | 
					
						
							| 
									
										
										
										
											2021-04-17 18:20:29 +02:00
										 |  |  | 	        utils/filtron.sh \
 | 
					
						
							|  |  |  | 	        utils/searx.sh \
 | 
					
						
							|  |  |  | 	        utils/morty.sh \
 | 
					
						
							|  |  |  | 	        utils/lxc.sh \
 | 
					
						
							|  |  |  | 	        utils/lxc-searx.env \
 | 
					
						
							|  |  |  | 	        .config.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-04-17 18:20:29 +02:00
										 |  |  | MANAGE += buildenv | 
					
						
							| 
									
										
										
										
											2021-08-16 11:30:53 +02:00
										 |  |  | MANAGE += weblate.translations.commit weblate.push.translations | 
					
						
							| 
									
										
										
										
											2021-06-06 13:02:07 +02:00
										 |  |  | MANAGE += data.all data.languages data.useragents data.osm_keys_tags | 
					
						
							| 
									
										
										
										
											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 | 
					
						
							|  |  |  | MANAGE += node.env node.clean | 
					
						
							|  |  |  | MANAGE += py.build py.clean | 
					
						
							|  |  |  | MANAGE += pyenv pyenv.install pyenv.uninstall | 
					
						
							|  |  |  | MANAGE += pypi.upload pypi.upload.test | 
					
						
							| 
									
										
										
										
											2021-05-27 21:22:00 +02:00
										 |  |  | MANAGE += test.yamllint test.pylint test.pep8 test.unit test.coverage test.robot test.clean | 
					
						
							| 
									
										
										
										
											2021-06-22 20:34:25 +02:00
										 |  |  | MANAGE += themes.all themes.oscar themes.simple pygments.less | 
					
						
							| 
									
										
										
										
											2021-06-26 08:46:20 +02:00
										 |  |  | MANAGE += static.build.commit static.build.drop static.build.restore | 
					
						
							| 
									
										
										
										
											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-06-23 12:48:31 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-17 18:20:29 +02:00
										 |  |  | # deprecated
 | 
					
						
							| 
									
										
										
										
											2020-03-26 18:41:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-17 18:20:29 +02:00
										 |  |  | PHONY += docs docs-clean docs-live docker themes | 
					
						
							| 
									
										
										
										
											2019-11-28 20:05:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-17 18:20:29 +02:00
										 |  |  | docs: docs.html | 
					
						
							|  |  |  | 	$(Q)./manage build_msg WARN $@ is deprecated use docs.html | 
					
						
							| 
									
										
										
										
											2020-04-01 15:45:01 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-17 18:20:29 +02:00
										 |  |  | docs-clean: docs.clean | 
					
						
							|  |  |  | 	$(Q)./manage build_msg WARN $@ is deprecated use docs.clean | 
					
						
							| 
									
										
										
										
											2020-04-01 15:45:01 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-17 18:20:29 +02:00
										 |  |  | docs-live: docs.live | 
					
						
							|  |  |  | 	$(Q)./manage build_msg WARN $@ is deprecated use docs.live | 
					
						
							| 
									
										
										
										
											2021-02-01 15:23:19 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-17 18:20:29 +02:00
										 |  |  | docker:  docker.build | 
					
						
							|  |  |  | 	$(Q)./manage build_msg WARN $@ is deprecated use docker.build | 
					
						
							| 
									
										
										
										
											2020-04-01 15:45:01 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-17 18:20:29 +02:00
										 |  |  | themes: themes.all | 
					
						
							|  |  |  | 	$(Q)./manage build_msg WARN $@ is deprecated use themes.all |