add makefile and contents
This commit is contained in:
25
Makefile
Normal file
25
Makefile
Normal 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)
|
||||
Reference in New Issue
Block a user