diff options
Diffstat (limited to 'code/makefile')
-rw-r--r-- | code/makefile | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/code/makefile b/code/makefile index df39830..45f1de5 100644 --- a/code/makefile +++ b/code/makefile @@ -3,18 +3,24 @@ TOOL := ../code/target/debug/blog-tool TOOLC := $(TOOL) --root=articles SRC_ARTICLES := $(shell find articles -type f) -OUT_ARTICLES := $(SRC_ARTICLES:articles/%.md=out/%.html) +OUT_ARTICLES := $(SRC_ARTICLES:articles/%.md=out/%) -all: $(OUT_ARTICLES) out/index.html out/feed.atom +ALL = $(OUT_ARTICLES) out/index out/feed.atom out/.index +all: $(ALL) +out/.index: + ln -sf index out/.index out/style.css: style.css cp $< $@ -out/index.html: $(TOOL) $(SRC_ARTICLES) +out/index: $(TOOL) $(SRC_ARTICLES) $(TOOLC) render-index > $@ out/feed.atom: $(TOOL) $(SRC_ARTICLES) $(TOOLC) generate-atom > $@ -out/%.html: articles/%.md $(TOOL) out/style.css +out/%: articles/%.md $(TOOL) out/style.css $(TOOLC) render-article $< > $@ $(TOOL): $(shell find ../code/src -type f) sh -c 'cd ../code; cargo build' + +clean: + rm $(ALL)
\ No newline at end of file |