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:
15
Makefile
15
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 \
|
docker run --rm -i \
|
||||||
--volume ${PWD}:/pwd \
|
--volume ${PWD}:/pwd \
|
||||||
--workdir /pwd \
|
--workdir /pwd \
|
||||||
|
|||||||
Reference in New Issue
Block a user