d49de4b668b6ab4fd6262127192ea579f051e1e8
[fw/sdcc] / doc / Makefile
1 include ../Makefile.common
2
3 MANUAL = sdccman
4 TSS = test_suite_spec
5 CDB = cdbfileformat
6
7 all: $(MANUAL).html $(MANUAL).pdf $(MANUAL).txt \
8         $(TSS).html $(TSS).pdf $(TSS).txt \
9         $(CDB).html $(CDB).pdf $(CDB).txt
10
11 install:
12         $(INSTALL) -d $(docdir)
13         cp -rf *.txt z80 avr $(docdir)
14         $(shell if [ -f $(MANUAL).html ]; then cp -rf $(MANUAL).html $(docdir); fi)
15         $(shell if [ -f $(TSS).html    ]; then cp -rf $(TSS).html    $(docdir); fi)
16         $(shell if [ -f $(CDB).html    ]; then cp -rf $(CDB).html    $(docdir); fi)
17         $(shell if [ -f *.pdf          ]; then cp -rf *.pdf          $(docdir); fi)
18
19 uninstall:
20         rm -rf $(docdir)
21
22
23 $(MANUAL).html: $(MANUAL).tex $(MANUAL).ind ;#$(MANUAL).glo
24         mkdir -p $@
25         # fixes latex2html problems with two consecutive dashes for long-options: --stack-auto
26         mv $< `basename $< .tex`.orig.tex
27         sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex > $<
28         -latex2html -split 5 -show_section_numbers -dir $(MANUAL).html $(MANUAL)
29         mv `basename $< .tex`.orig.tex $<
30
31 $(TSS).html: $(TSS).tex
32         mkdir -p $@
33         # fixes latex2html problems with two consecutive dashes for long-options: --stack-auto
34         mv $< `basename $< .tex`.orig.tex
35         sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex > $<
36         -latex2html -split 0 -dir $(TSS).html $(TSS)
37         mv `basename $< .tex`.orig.tex $<
38
39 $(CDB).html: $(CDB).tex
40         mkdir -p $@
41         # fixes latex2html problems with two consecutive dashes for long-options: --stack-auto
42         mv $< `basename $< .tex`.orig.tex
43         sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex > $<
44         -latex2html -split 0 -show_section_numbers -dir $(CDB).html $(CDB)
45         mv `basename $< .tex`.orig.tex $<
46
47 %.txt: %.lyx
48         lyx -e text $<
49
50 %.pdf: %.tex %.dvi
51         which pdflatex > /dev/null && pdflatex $* || dvipdf $*
52
53 %.dvi: %.tex
54         latex $<
55
56 %.tex: %.lyx
57         lyx -e latex $<
58
59 %.ind: %.dvi
60         makeindex -s l2hidx.ist $*
61
62 %.glo: %.dvi
63         # the glossary, not implemented yet
64         # makeindex -s l2hglo.ist -o $@ $<
65
66 include clean.mk