forked from themr0c/themr0c.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (44 loc) · 1.45 KB
/
Makefile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
## User Documentation Makefile
PROJECTNAME = ecriredeladoc
SOURCES = $(PROJECTNAME).txt
TARGETS = slides/index.html html/$(PROJECTNAME).html $(PROJECTNAME).pdf
## Asciidoc with general options
ASCIIDOC = asciidoc --doctype=book -a docinfo2 -a lang=fr
## Specific asciidoc options for XHTML output
ASCIIDOCHTMLOPTS = --backend xhtml11 \
-a stylesdir=$(CURDIR)/style/html \
-a theme=centsix \
-a numbered \
-a toc2 \
-a icons \
-a badges \
-a max-width=50em \
-a lang=fr \
-a toc-title="Ecrire de la Documentation"
## Specific asciidoc options for XHTML slides output
ASCIIDOCSLIDESOPTS = --backend slidy \
-a stylesdir=$(CURDIR)/style/html \
-a theme=centsix \
-a icons \
-a lang=fr
# -a linkcss
## Generate PDF from docbook
DOCBOOK2PDF = dblatex -tpdf
SEE = see
all: $(TARGETS)
$(PROJECTNAME).pdf : $(PROJECTNAME).txt
$(ASCIIDOC) --backend docbook $?
$(DOCBOOK2PDF) $(PROJECTNAME).xml
html/$(PROJECTNAME).html : $(PROJECTNAME).txt
mkdir -p html/graphs
$(ASCIIDOC) $(ASCIIDOCHTMLOPTS) --out-file $@ $?
cp -Rf style/html/* images html/
slides/index.html : $(PROJECTNAME).txt
mkdir -p slides
$(ASCIIDOC) $(ASCIIDOCSLIDESOPTS) --out-file slides/index.html $?
cp -Rf style/html/* images slides/
## WARNING: at cleanup, delete png files that were produced by output only !
clean :
rm -rf $(PROJECTNAME).xml *.pdf *.html *.png temp graphs html slides *.svg
view : all
$(SEE) $(TARGETS)