summaryrefslogtreecommitdiffstats
path: root/documentation/Makefile
blob: 6ba976e0c7b31016f64fab9c383cb04760bd6753 (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
PANDOC=pandoc
PANDOCFLAGS=--standalone --smart --toc -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)
	$(PANDOC) $(PANDOCFLAGS) --latex-engine=xelatex --variable lang=french $< -o $@


%.tex: %.md
	$(PANDOC) $(PANDOCFLAGS) --latex-engine=xelatex --variable lang=french $< -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/