Files
OliveTin/Makefile
T
jamesreadandCursor 91f7764de2 perf: optimize frontend build and initial loading
Remove redundant component scanning, lazy-load terminal CSS and locale
messages, and clean obsolete frontend package metadata. Generate one JSON
file per locale so initial loads only fetch English and the selected locale.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 17:47:33 +01:00

100 lines
2.3 KiB
Makefile

define delete-files
python3 -c "import shutil;shutil.rmtree('$(1)', ignore_errors=True)"
endef
default: proto service webui-dist
service:
$(MAKE) -wC service
service-prep:
$(MAKE) -wC service prep
windows-resources:
VERSION="$(VERSION)" ./var/windows/generate-resources.sh
windows-msi:
VERSION="$(VERSION)" ./var/windows/build-msi.sh
service-unittests:
$(MAKE) -wC service unittests
service-codestyle:
$(MAKE) -wC service codestyle
frontend-codestyle:
$(MAKE) -wC frontend codestyle
frontend-unittests:
$(MAKE) -wC frontend unittests
docs-check:
python3 docs/modules/ROOT/check_config_keys.py
python3 docs/modules/ROOT/check_chevron_links.py
it:
$(MAKE) -wC integration-tests
go-tools:
$(MAKE) -wC service go-tools
proto-tools:
$(MAKE) -wC service proto-tools
proto: proto-tools
$(MAKE) -wC proto
lang-generate:
$(MAKE) -wC lang
generated-check: proto lang-generate
git diff --exit-code -- service/gen frontend/resources/scripts/gen lang/generated
@untracked="$$(git ls-files --others --exclude-standard -- service/gen frontend/resources/scripts/gen lang/generated)"; \
test -z "$$untracked" || { printf 'Untracked generated files:\n%s\n' "$$untracked"; exit 1; }
dist:
echo "dist noop"
podman-image:
buildah bud -f Dockerfile.singlearch -t olivetin
podman-container:
podman kill olivetin || true
podman rm olivetin || true
podman create --name olivetin -p 1337:1337 -v /etc/OliveTin/:/config:ro olivetin
podman start olivetin
integration-tests-docker-image:
docker rm -f olivetin && docker rmi -f olivetin
docker build -f Dockerfile.singlearch -t olivetin:latest .
docker create --name olivetin -p 1337:1337 -v `pwd`/integration-tests/configs/:/config/ olivetin
devrun: compile
killall OliveTin || true
./OliveTin &
devcontainer: compile podman-image podman-container
webui-dist:
$(call delete-files,webui)
$(MAKE) -wC frontend dist
mv frontend/dist webui
clean:
$(call delete-files,dist)
$(call delete-files,OliveTin)
$(call delete-files,OliveTin.armhf)
$(call delete-files,OliveTin.exe)
rm -f service/resource_windows_*.syso
$(call delete-files,reports)
$(call delete-files,gen)
config-tool:
cd service && go run cmd/config-tool/main.go
devcheck:
python3 scripts/devcheck.py $(ARGS)
.PHONY: proto proto-tools lang-generate generated-check default service windows-resources windows-msi frontend-unittests docs-check it devcheck