add makefile and contents

This commit is contained in:
2020-08-28 18:21:05 +02:00
parent b202c38d06
commit 7a711e8286
7 changed files with 1102 additions and 0 deletions

25
Makefile Normal file
View File

@@ -0,0 +1,25 @@
src := content
cache := .cache
www := _site/posts
post_compiler := src/webcc.ml
builddir := _build/default
POSTCC := $(builddir)/$(patsubst %.ml,%.exe,$(post_compiler))
post-sources := $(shell find $(src)/ -type f)
post-htmls := $(patsubst $(src)/%.md,$(www)/%.html,$(post-sources))
all: $(POSTCC) $(post-htmls)
$(www):
mkdir -p $(www)
$(www)/%.html: $(src)/%.md $(www)
$(POSTCC) $< -o $@
$(POSTCC): $(post_compiler)
dune build
clean:
rm $(POSTCC)