summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 14 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 70924f3..270230b 100644
--- a/Makefile
+++ b/Makefile
@@ -3,13 +3,24 @@ PAGES=index.html\
blog/first.html\
blog/anonimato-estatistica.html
-all: $(PAGES)
+RSS = blog/index.rss
+
+URL ?= http://localhost:8000
+
+all: $(PAGES) blog/index.rss
clean:
- rm -f $(PAGES) dist.tar.gz
+ rm -f $(PAGES) $(RSS) dist.tar.gz
dist: all
- tar -cv static $(PAGES) | gzip > dist.tar.gz
+ tar -cv static $(RSS) $(PAGES) | gzip > dist.tar.gz
+
+blog/index.rss: blog/posts.csv
+ ./csv2rss.sh 'Blogs do Esquizo' '$(URL)/blog' 'Transliteração das vozes da minha cabeça' \
+ < blog/posts.csv > blog/index.rss
+
+blog/index.html: blog/posts.csv templates/base.m4
+ m4 -DPAGECONTENT="$$(./csv2index.sh /blog < $<)" templates/base.m4 > $@
%.html: %.md templates/base.m4
m4 -DPAGECONTENT="$$(markdown $<)" templates/base.m4 > $@