Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.pylint test.pep8 test.unit test.robot
  37. # TODO: balance linting with pylint
  38. test: test.pep8 test.unit test.robot
  39. - make pylint
  40. test.pep8: pyenvinstall
  41. $(PY_ENV_ACT); ./manage.sh pep8_check
  42. test.unit: pyenvinstall
  43. $(PY_ENV_ACT); ./manage.sh unit_tests
  44. test.robot: pyenvinstall
  45. $(PY_ENV_ACT); ./manage.sh install_geckodriver
  46. $(PY_ENV_ACT); ./manage.sh robot_tests
  47. .PHONY: $(PHONY)