.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