Makefile 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. define delete-files
  2. python3 -c "import shutil;shutil.rmtree('$(1)', ignore_errors=True)"
  3. endef
  4. default: proto service webui-dist
  5. service:
  6. $(MAKE) -wC service
  7. service-prep:
  8. $(MAKE) -wC service prep
  9. windows-resources:
  10. VERSION="$(VERSION)" ./var/windows/generate-resources.sh
  11. windows-msi:
  12. VERSION="$(VERSION)" ./var/windows/build-msi.sh
  13. service-unittests:
  14. $(MAKE) -wC service unittests
  15. service-codestyle:
  16. $(MAKE) -wC service codestyle
  17. frontend-codestyle:
  18. $(MAKE) -wC frontend codestyle
  19. frontend-unittests:
  20. $(MAKE) -wC frontend unittests
  21. docs-check:
  22. python3 docs/modules/ROOT/check_config_keys.py
  23. python3 docs/modules/ROOT/check_chevron_links.py
  24. it:
  25. $(MAKE) -wC integration-tests
  26. go-tools:
  27. $(MAKE) -wC service go-tools
  28. proto-tools:
  29. $(MAKE) -wC service proto-tools
  30. proto: proto-tools
  31. $(MAKE) -wC proto
  32. lang-generate:
  33. $(MAKE) -wC lang
  34. generated-check: proto lang-generate
  35. git diff --exit-code -- service/gen frontend/resources/scripts/gen lang/generated
  36. @untracked="$$(git ls-files --others --exclude-standard -- service/gen frontend/resources/scripts/gen lang/generated)"; \
  37. test -z "$$untracked" || { printf 'Untracked generated files:\n%s\n' "$$untracked"; exit 1; }
  38. dist:
  39. echo "dist noop"
  40. podman-image:
  41. buildah bud -f Dockerfile.singlearch -t olivetin
  42. podman-container:
  43. podman kill olivetin || true
  44. podman rm olivetin || true
  45. podman create --name olivetin -p 1337:1337 -v /etc/OliveTin/:/config:ro olivetin
  46. podman start olivetin
  47. integration-tests-docker-image:
  48. docker rm -f olivetin && docker rmi -f olivetin
  49. docker build -f Dockerfile.singlearch -t olivetin:latest .
  50. docker create --name olivetin -p 1337:1337 -v `pwd`/integration-tests/configs/:/config/ olivetin
  51. devrun: compile
  52. killall OliveTin || true
  53. ./OliveTin &
  54. devcontainer: compile podman-image podman-container
  55. webui-dist:
  56. $(call delete-files,webui)
  57. $(MAKE) -wC frontend dist
  58. mv frontend/dist webui
  59. clean:
  60. $(call delete-files,dist)
  61. $(call delete-files,OliveTin)
  62. $(call delete-files,OliveTin.armhf)
  63. $(call delete-files,OliveTin.exe)
  64. rm -f service/resource_windows_*.syso
  65. $(call delete-files,reports)
  66. $(call delete-files,gen)
  67. config-tool:
  68. cd service && go run cmd/config-tool/main.go
  69. devcheck:
  70. python3 scripts/devcheck.py $(ARGS)
  71. .PHONY: proto proto-tools lang-generate generated-check default service windows-resources windows-msi frontend-unittests docs-check it devcheck