summaryrefslogtreecommitdiffstats
path: root/docs/Makefile
blob: 68c953e2b3d698e4f4b61420b21c8ed950c3104c (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
#!/usr/bin/env make
# license: gnu gpl version 3 or higher.
# copyright 2016 rsiddharth <s@ricketyspace.net>

build_dir=_build

# docs
header=assets/includes/header.html
footer=assets/includes/footer.html

index_src=index.org
index_out=$(build_dir)/index.html

nothing:
	@echo "Give me something to make. "

html: $(index_out)

.PHONY: html

$(build_dir):
	@mkdir $@

$(index_out): $(index_src) $(header) $(footer) $(build_dir)
	@cat $(header) > $@
	@pandoc -f org -t html $< >> $@
	@cat $(footer) >> $@

clean: $(build_dir)
	@rm -rf $<

.PHONY: clean