webcc/Makefile

26 lines
462 B
Makefile
Raw Normal View History

2020-08-28 18:21:05 +02:00
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)