summaryrefslogtreecommitdiffstats
path: root/doc/Makefile
blob: 38d841c56c79b5efdfabe9a3cd1c042d5f5cc91f (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
PANDOC=pandoc
PANDOCFLAGS=--standalone --smart --toc --number-sections --latex-engine=xelatex --variable geometry=margin=3cm --variable lang=french --variable mainfont=Cantarell --variable fontsize=12pt -c pandoc.css
SRCS=$(wildcard *.md)
IMAGES=$(wildcard images/*.png)
PDFS=$(SRCS:%.md=%.pdf)
HTMLS=$(SRCS:%.md=%.html)
TEXS=$(SRCS:%.md=%.tex)
ALL=$(PDFS) $(HTMLS) index.html

all: $(ALL)

index.html: $(SRCS) index.html.build
	echo $(IMAGES)
	sh ./index.html.build > index.html

%.pdf: %.md $(IMAGES) Makefile
	$(PANDOC) $(PANDOCFLAGS) $< -o $@

%.tex: %.md
	$(PANDOC) $(PANDOCFLAGS) $< -o $@

%.html: %.md
	$(PANDOC) $(PANDOCFLAGS) $< -o $@

%.txt: %.md
	$(PANDOC) $(PANDOCFLAGS) $< -o $@

.PHONY:

tex: $(TEXS)

clean:
	rm -f index.html $(PDFS) $(HTMLS) $(TEXS) $(SRCS:%.md=%.aux) $(SRCS:%.md=%.log) $(SRCS:%.md=%.out) $(SRCS:%.md=%.toc)

publish: $(ALL)
	rsync -av * doc.entrouvert.org:/var/vhosts/doc.entrouvert.org/web/supann/