Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # -*- coding: utf-8; mode: makefile-gmake -*-
  2. PYOBJECTS = searx
  3. PY_SETUP_EXTRAS ?= \[test\]
  4. include utils/makefile.include
  5. include utils/makefile.python
  6. all: clean install
  7. PHONY += help
  8. help:
  9. @echo ' test - run developer tests'
  10. @echo ' run - run developer instance'
  11. @echo ' install - developer install (./local)'
  12. @echo ' uninstall - uninstall (./local)'
  13. @echo ''
  14. @$(MAKE) -s -f utils/makefile.include make-help
  15. @echo ''
  16. @$(MAKE) -s -f utils/makefile.python python-help
  17. PHONY += install
  18. install: pyenvinstall
  19. PHONY += uninstall
  20. uninstall: pyenvuninstall
  21. PHONY += clean
  22. clean: pyclean
  23. $(call cmd,common_clean)
  24. PHONY += run
  25. run: pyenvinstall
  26. $(Q) ( \
  27. sed -i -e "s/debug : False/debug : True/g" ./searx/settings.yml ; \
  28. sleep 2 ; \
  29. xdg-open http://127.0.0.1:8888/ ; \
  30. sleep 3 ; \
  31. sed -i -e "s/debug : True/debug : False/g" ./searx/settings.yml ; \
  32. ) &
  33. $(PY_ENV)/bin/python ./searx/webapp.py
  34. # test
  35. # ----
  36. PHONY += test test.pep8 test.unit test.robot
  37. test: test.pep8 test.unit test.robot
  38. test.pep8: pyenvinstall
  39. $(PY_ENV_ACT); ./manage.sh pep8_check
  40. test.unit: pyenvinstall
  41. $(PY_ENV_ACT); ./manage.sh unit_tests
  42. test.robot: pyenvinstall
  43. $(PY_ENV_ACT); ./manage.sh install_geckodriver
  44. $(PY_ENV_ACT); ./manage.sh robot_tests
  45. .PHONY: $(PHONY)