summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: df5f30952ef734cc1f7678d3a630d1df8ab662d1 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
HTML := index.html journal.html about.html
CSS  := style.css journal/isso.css
RESOURCES := glider.png me.jpg
TEMPLATES := $(shell find src/templates)

FILES := $(HTML) $(CSS) sitemap.xml pgp-key.txt \
         $(addprefix resources/, $(RESOURCES))

site: build/journal/ build/resources/ $(addprefix build/, $(FILES))

build/%/:
	mkdir $@

clean:
	-rm -r $(addprefix build/, $(FILES)) build/journal.xml build/journal build/resources

build/index.html: src/index.rst $(TEMPLATES)
	@./scripts/bupa index.html
	@echo Built index.html

build/about.html: src/about.rst $(TEMPLATES)
	@./scripts/bupa about.html
	@echo Built about.html

build/journal.html: $(shell find src/journal) $(TEMPLATES)
	@./scripts/bupa journal.html
	@echo Built journal

build/%.css: src/%.css
	@install -Dm644 $< $@
	@echo Copied $<  $@

build/resources/%: src/resources/%
	@install -m644 $< $@
	@echo Copied $<  $@

build/sitemap.xml: src/sitemap.xml
	@install -Dm644 $< $@
	@echo Copied $<  $@

build/pgp-key.txt: src/pgp-key.txt
	@install -Dm644 $< $@
	@echo Copied $<  $@