* Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
[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         latex2html -split 5 -show_section_numbers -dir $(MANUAL).html $(MANUAL)
26
27 $(TSS).html: $(TSS).tex
28         mkdir -p $@
29         latex2html -split 0 -dir $(TSS).html $(TSS)
30
31 $(CDB).html: $(CDB).tex
32         mkdir -p $@
33         latex2html -split 0 -show_section_numbers -dir $(CDB).html $(CDB)
34
35 %.txt: %.lyx
36         lyx -e text $<
37         sed s/---/--/ $@ > $*.tmp
38         mv $*.tmp $@
39
40 %.pdf: %.tex %.dvi
41         which pdflatex > /dev/null && pdflatex $* || dvipdf $*
42
43 %.dvi: %.tex
44         latex $<
45
46 %.tex: %.lyx
47         lyx -e latex $<
48
49 %.ind: %.dvi
50         makeindex -s l2hidx.ist $*
51
52 %.glo: %.dvi
53         # the glossary, not implemented yet
54         # makeindex -s l2hglo.ist -o $@ $<
55
56 include clean.mk