Support mounting a Kalamar instance for local testing

Add an optional KALAMAR_INSTANCE variable to the `korap` target. When
set to a Kalamar-Instance-* checkout, its compose.instance.yaml overlay
is layered onto the fetched KorAP-Docker compose (via a second `-f`) and
its absolute path is exported as KALAMAR_INSTANCE_DIR, mounting the
instance's config and templates into the kalamar container:

    make korap KALAMAR_INSTANCE=../Kalamar-Instance-IDS

Without the variable the target behaves exactly as before. This project
keeps no knowledge of any particular instance -- the instance owns its
own mount map -- so instances stay independently updatable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Change-Id: I4fd7d6474e05e43c95b0989e78724157c6afdb81
diff --git a/Makefile b/Makefile
index 99aeb4a..be1cfef 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,14 @@
 SRC_DIR ?= I5
 KORAP_PORT ?= 64543
 
+# Optional: path to a Kalamar-Instance-* checkout (e.g. ../Kalamar-Instance-IDS)
+# whose customizations (config, custom templates, plugins) should be mounted
+# into the kalamar container. The instance ships its own compose.instance.yaml
+# describing what to mount where, so this project needs no knowledge of it.
+#   make korap KALAMAR_INSTANCE=../Kalamar-Instance-IDS
+KALAMAR_INSTANCE ?=
+KALAMAR_INSTANCE_DIR := $(abspath $(KALAMAR_INSTANCE))
+
 # Discover all *.i5.xml files in SRC_DIR, excluding inlined tagged copies (*-TAG.i5.xml)
 I5_FILES := $(filter-out %-TAG.i5.xml,$(wildcard $(SRC_DIR)/*.i5.xml))
 BASENAMES := $(patsubst %.i5.xml,%,$(notdir $(I5_FILES)))
@@ -191,7 +199,7 @@
 	java -jar lib/Krill-Indexer.jar -c lib/krill.cfg --progress -i $(subst " ",;,$^) -o $@
 
 korap: check-src $(TARGET_DIR)/index
-	curl -s https://raw.githubusercontent.com/KorAP/KorAP-Docker/master/compose.yaml | sed 's/64543:64543/$(KORAP_PORT):64543/g' | COMPOSE_PROFILES='export,open,lite' INDEX='$(TARGET_DIR)/index' docker compose -p korap -f - up
+	curl -s https://raw.githubusercontent.com/KorAP/KorAP-Docker/master/compose.yaml | sed 's/64543:64543/$(KORAP_PORT):64543/g' | COMPOSE_PROFILES='export,open,lite' INDEX='$(TARGET_DIR)/index' $(if $(KALAMAR_INSTANCE),KALAMAR_INSTANCE_DIR='$(KALAMAR_INSTANCE_DIR)') docker compose -p korap -f - $(if $(KALAMAR_INSTANCE),-f '$(KALAMAR_INSTANCE_DIR)/compose.instance.yaml') up
 
 $(TARGET_DIR)/index.tar.xz: $(TARGET_DIR)/index
 	tar -I 'xz -T0' -C $(dir $<) -cf $@ $(notdir $<)