diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-08-27 19:12:36 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-08-27 19:12:36 -0400 |
commit | 75d4d72a1f5352d1c3520fbaf96911309fc7f96a (patch) | |
tree | 942dfa89658964e5954f159fa4d9b41c6b7bc423 /Makefile | |
parent | b373a3a6e1702e7514bb405122a2311d16d85fcd (diff) |
index.atom, also: write-atomic
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
1 files changed, 15 insertions, 14 deletions
@@ -1,26 +1,27 @@ -articles = $(filter-out public/index,$(patsubst %.md,%,$(wildcard public/*.md))) +articles = $(sort $(filter-out public/index,$(patsubst %.md,%,$(wildcard public/*.md)))) -.DELETE_ON_ERROR: -.SECONDARY: +all: public/index.html public/index.atom $(addsuffix .html,$(articles)) -all: public/index.html $(addsuffix .html,$(articles)) +public/%.html: public/%.md page page.html.erb util.rb Makefile write-atomic + ./page html $< | ./write-atomic $@ +public/%.atom: public/%.md page page.atom.erb util.rb Makefile write-atomic + ./page atom $< | ./write-atomic $@ +public/index.md : index index.md.erb .var.articles $(addsuffix .md,$(articles)) util.rb Makefile write-atomic + ./index md $(filter %.md,$^) | ./write-atomic $@ +public/index.atom: index index.atom.erb .var.articles $(addsuffix .md,$(articles)) util.rb Makefile write-atomic + ./index atom $(filter %.md,$^) | ./write-atomic $@ -public/%.html: public/%.md pagerender.rb template.html.erb util.rb Makefile - ./pagerender.rb html $< > $@ -public/%.atom: public/%.md pagerender.rb template.atom.erb util.rb Makefile - ./pagerender.rb atom $< > $@ -public/index.md: .var.articles $(addsuffix .md,$(articles)) index.rb Makefile - ./index.rb $(filter %.md,$^) > $@ +clean: + rm -f -- public/*.html public/*.atom public/index.md .var* .tmp* -.var.%: FORCE +.var.%: FORCE write-ifchanged @printf '%s' $(call quote.shell,$($*)) | sed 's/^/#/' | ./write-ifchanged $@ -include $(wildcard .var.*) -clean: - rm -f -- public/*.html public/*.atom public/index.md .var* .tmp* - .PHONY: FORCE .PHONY: all clean +.DELETE_ON_ERROR: +.SECONDARY: define nl |