-bottom_navigation for sdccman.html pages
[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         # fixes latex2html problems with \tabularnewline
27         mv $< `basename $< .tex`.orig.tex
28         sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex | \
29         sed 's,\\tabularnewline$$,\\\\,g' > $<
30         -latex2html -split 5 -show_section_numbers -bottom_navigation -dir $(MANUAL).html $(MANUAL)
31         mv `basename $< .tex`.orig.tex $<
32
33 $(TSS).html: $(TSS).tex
34         mkdir -p $@
35         # fixes latex2html problems with two consecutive dashes for long-options: --stack-auto
36         # fixes latex2html problems with \tabularnewline
37         mv $< `basename $< .tex`.orig.tex
38         sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex | \
39         sed 's,\\tabularnewline$$,\\\\,g' > $<
40         -latex2html -split 0 -dir $(TSS).html $(TSS)
41         mv `basename $< .tex`.orig.tex $<
42
43 $(CDB).html: $(CDB).tex
44         mkdir -p $@
45         # fixes latex2html problems with two consecutive dashes for long-options: --stack-auto
46         # fixes latex2html problems with \tabularnewline
47         mv $< `basename $< .tex`.orig.tex
48         sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex | \
49         sed 's,\\tabularnewline$$,\\\\,g' > $<
50         -latex2html -split 0 -show_section_numbers -dir $(CDB).html $(CDB)
51         mv `basename $< .tex`.orig.tex $<
52
53 %.txt: %.lyx
54         lyx -e text $<
55
56 %.pdf: %.tex %.dvi
57         which pdflatex > /dev/null && pdflatex $* || dvipdf $*
58
59 %.dvi: %.tex
60         latex $<
61
62 %.tex: %.lyx
63         lyx -e latex $<
64
65 %.ind: %.dvi
66         makeindex -s l2hidx.ist $*
67
68 %.glo: %.dvi
69         # the glossary, not implemented yet
70         # makeindex -s l2hglo.ist -o $@ $<
71
72 include clean.mk