generate the post index
This commit is contained in:
10
Makefile
10
Makefile
@@ -8,11 +8,12 @@ post_compiler := src/webcc.ml
|
||||
builddir := _build/default
|
||||
|
||||
POSTCC := $(builddir)/$(patsubst %.ml,%.exe,$(post_compiler))
|
||||
INDEXCC := $(POSTCC) -i
|
||||
|
||||
post-sources := $(shell find $(src)/ -type f)
|
||||
post-htmls := $(patsubst $(src)/%.md,$(www)/%.html,$(post-sources))
|
||||
|
||||
.PHONY: all serve clean $(post_index)
|
||||
.PHONY: all serve clean $(POSTCC)
|
||||
|
||||
all: $(POSTCC) $(post-htmls) $(post_index) $(www_root)/static
|
||||
cp -R ~/www/* $(www_root)
|
||||
@@ -23,10 +24,8 @@ $(www):
|
||||
$(www)/%.html: $(src)/%.md $(www)
|
||||
$(POSTCC) $< -o $@
|
||||
|
||||
# make sure that this target is .PHONY!
|
||||
$(post_index):
|
||||
echo hm > $@
|
||||
|
||||
$(post_index): $(post-sources)
|
||||
$(INDEXCC) $^ -o $@
|
||||
|
||||
$(www_root)/static:
|
||||
cp -R static $@
|
||||
@@ -35,7 +34,6 @@ $(POSTCC): $(post_compiler)
|
||||
dune build
|
||||
|
||||
clean:
|
||||
rm $(POSTCC)
|
||||
rm -fr $(www_root)
|
||||
|
||||
serve:
|
||||
|
||||
Reference in New Issue
Block a user