From 37a1a4384c28d0243c20a613f46a60ea85e5c665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allen-Kristjan=20P=C3=A4ll?= Date: Tue, 10 Feb 2026 05:08:17 +0200 Subject: [PATCH] Makefile: run config.json target if files in files dir changed --- Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 70ba800..a7d4f07 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,17 @@ -config.json: config.yaml +FILES := $(wildcard files/*) + +default: + $(MAKE) .generate-files-list + $(MAKE) config.json +.PHONY: default + +.generate-files-list: $(FILES) + if ! echo $(FILES) | diff -q .files-list - >/dev/null 2>&1; then \ + echo $(FILES) > .files-list; \ + fi +.PHONY: .generate-files-list + +config.json: config.yaml .files-list $(FILES) docker run --rm -i \ --volume ${PWD}:/pwd \ --workdir /pwd \