summaryrefslogtreecommitdiff
path: root/Makefile
blob: 270230b474c93c2c1e71d732624a94442c9bf799 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
PAGES=index.html\
	  blog/index.html\
	  blog/first.html\
	  blog/anonimato-estatistica.html

RSS = blog/index.rss

URL ?= http://localhost:8000

all: $(PAGES) blog/index.rss

clean:
	rm -f $(PAGES) $(RSS) dist.tar.gz

dist: all
	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 > $@

.PHONY: all clean dist