-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (23 loc) · 804 Bytes
/
Makefile
File metadata and controls
33 lines (23 loc) · 804 Bytes
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
SOURCES=$(wildcard *.md)
PDF=$(SOURCES:%.md=%.pdf)
HTML=$(SOURCES:%.md=%.html)
INSTALL=install -c -m 644
PYTHON=python
PANDOCARGS=-s
PANDOC=/usr/bin/pandoc
export LANGUAGE=C
export LC_ALL=C
all: html index.html
pdf: $(PDF)
html: $(HTML)
# This needs pandoc 1.9 or later to work
%.pdf: %.md
$(PANDOC) -f markdown -o $*.pdf $*.md
%.html: %.md style.css
$(PANDOC) $(PANDOCARGS) -H style.css -f markdown -t html --toc -o $*.html $*.md --metadata title="$(shell head -n1 $*.md | sed -e 's|`||g')"
docs.md: $(SOURCES) style.css
$(PANDOC) $(PANDOCARGS) -H style.css -f markdown -t markdown --toc -o $@ *.md
index.html: $(SOURCES) style.css
$(PANDOC) $(PANDOCARGS) -H style.css -f markdown -t html --toc -o $@ *.md --metadata title="Folly API Documentation"
clean:
$(RM) $(PDF) $(HTML) index.html