26 lines
462 B
Makefile
26 lines
462 B
Makefile
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)
|