summaryrefslogtreecommitdiff
path: root/makefile
blob: 6d12cb6c9c8c46f47de3f79e1d85a24fcd0db4a8 (plain) (blame)
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
MD = $(shell find md/ -type f -name '*.md')
HTML= $(patsubst md/%.md, html/%.html, $(MD))
CSS = $(shell find md/ -type f -name '*.css')
CSS_HTML = $(patsubst md/%.css, html/%.css, $(CSS))
53HORNET_HTML = $(patsubst md/53hor.net/%.md, html/53hor.net/%.html, $(MD))
ATC_HTML = $(patsubst md/atc.53hor.net/%.md, html/atc.53hor.net/%.html, $(MD))

.PHONY: all
all: css 53hor.net atc.53hor.net

.PHONY: 53hor.net
53hor.net: $(53HORNET_HTML)

html/53hor.net/%.html: md/53hor.net/%.md md/53hor.net/nav.html
	@echo   "53hor.net: $< -> $@"
	@mkdir -p "$(@D)"
	@pandoc "$<" -f markdown -t html5 -s --toc --toc-depth=3 -B md/53hor.net/nav.html -c /styles.css -o "$@"

.PHONY: atc.53hor.net
atc.53hor.net: $(ATC_HTML)

html/atc.53hor.net/%.html: md/atc.53hor.net/%.md
	@echo "atc.53hor.net: $< -> $@"
	@mkdir -p "$(@D)"
	@pandoc "$<" -f markdown -t html5 -s --toc --toc-depth=3 -c /styles.css -o "$@"

.PHONY: css
css: $(CSS_HTML)

html/%.css: md/%.css
	@echo "css: $< -> $@"
	@mkdir -p "$(@D)"
	@cp "$<" "$@"

clean:
	@rm -rf html/