1
0
mirror of https://github.com/akpall/akpella.git synced 2026-02-21 08:36:59 +00:00

Makefile: run config.json target if files in files dir changed

This commit is contained in:
2026-02-10 05:08:17 +02:00
parent 1571a4b6c4
commit 37a1a4384c

View File

@@ -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 \