Add makefile

This commit is contained in:
Midgard 2020-06-02 02:47:22 +02:00
parent 7291336e5f
commit 437cdd9cf0
Signed by untrusted user who does not match committer: midgard
GPG Key ID: 511C112F1331BBB4
1 changed files with 20 additions and 0 deletions

20
makefile Normal file
View File

@ -0,0 +1,20 @@
BUILD_DIR = /home/ruben/dwn/midgard
BLOG ::= $(sort $(wildcard blog/*.md))
BLOG_HTML ::= $(BLOG:%.md=$(BUILD_DIR)/%.html)
.PHONY: clean
all: $(BUILD_DIR)/index.html $(BLOG_HTML)
$(BUILD_DIR)/index.html: $(BUILD_DIR) do_index.py index.html $(BLOG)
./do_index.py "index.html" "$@"
$(BUILD_DIR)/%.html: $(BUILD_DIR) do_blog.py %.md
./do_blog.py "$(*F).md" "$@"
$(BUILD_DIR):
mkdir -p "$@"
clean:
rm -rf "$(OUTPUT)" "$(BUILD_DIR)"