diff options
| author | cashmere <cashmere@autistici.org> | 2026-09-04 09:05:24 +0200 |
|---|---|---|
| committer | cashmere <cashmere@autistici.org> | 2026-09-04 09:05:24 +0200 |
| commit | 4f49b16079b27d7ce633619e4cddfdf2bffbc952 (patch) | |
| tree | c296c1e7f3c3e2f6859c6d3a1b1b208779b89679 /Makefile | |
| download | relic-4f49b16079b27d7ce633619e4cddfdf2bffbc952.tar.gz | |
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..78a06f1 --- /dev/null +++ b/Makefile @@ -0,0 +1,50 @@ +.PHONY: fossil build start preview test test-fossil-org test-upstream test-org test-smoke test-visual clean + +BUILD_DIR := $(CURDIR)/.build/fossil +CONFIG_STAMP := $(BUILD_DIR)/.copland-configured +COPLAND_DIR := $(CURDIR)/tools/copland +export PATH := $(BUILD_DIR):$(PATH) +FOSSIL ?= fossil +export FOSSIL + +$(COPLAND_DIR)/node_modules: $(COPLAND_DIR)/package.json $(COPLAND_DIR)/package-lock.json + cd $(COPLAND_DIR) && npm ci + +$(CONFIG_STAMP): configure Makefile shell.nix + mkdir -p $(BUILD_DIR) + @if [ -f $(BUILD_DIR)/Makefile ]; then $(MAKE) -C $(BUILD_DIR) clean; fi + cd $(BUILD_DIR) && ../../configure --disable-fusefs --json + touch $(CONFIG_STAMP) + +fossil: $(CONFIG_STAMP) + $(MAKE) -C $(BUILD_DIR) -j$${BUILD_JOBS:-2} fossil + +build: $(COPLAND_DIR)/node_modules + cd $(COPLAND_DIR) && npm run build + +start: fossil build + $(COPLAND_DIR)/scripts/preview.sh + +preview: start + +test-org: fossil + $(COPLAND_DIR)/tests/org-renderer.sh + +test-fossil-org: fossil + $(MAKE) -C $(BUILD_DIR) test TESTFLAGS='org.test wiki.test' + +test-smoke: fossil build + $(COPLAND_DIR)/tests/smoke.sh + +test-visual: fossil build + cd $(COPLAND_DIR) && npm run test:visual + +test-upstream: fossil + $(MAKE) -C $(BUILD_DIR) test + +test: test-fossil-org test-org test-smoke test-visual + +clean: + @if [ -d .copland-preview ]; then mv .copland-preview ".copland-preview.old.$$(date +%s)"; fi + @if [ -d tools/copland/test-output ]; then mv tools/copland/test-output "tools/copland/test-output.old.$$(date +%s)"; fi + @if [ -d tools/copland/playwright-report ]; then mv tools/copland/playwright-report "tools/copland/playwright-report.old.$$(date +%s)"; fi |
