a small hack to fix the double dash --problem
[fw/sdcc] / doc / Makefile
1 include ../Makefile.common
2
3 MANUAL = sdccman
4 TSS = test_suite_spec
5
6 all: $(MANUAL).html $(MANUAL).pdf $(MANUAL).txt \
7         $(TSS).html $(TSS).pdf $(TSS).txt
8
9 install:
10         $(INSTALL) -d $(docdir)
11         cp -rf *.html *.txt z80 avr $(docdir)
12         $(shell if [ -f $(MANUAL).html ]; then cp -rf $(MANUAL).html $(docdir); fi)
13         $(shell if [ -f $(TSS).html    ]; then cp -rf $(TSS).html    $(docdir); fi)
14         $(shell if [ -f *.pdf          ]; then cp -rf *.pdf          $(docdir); fi)
15
16 uninstall:
17         rm -rf $(docdir)
18
19
20 $(MANUAL).html: $(MANUAL).tex $(MANUAL).ind ;#$(MANUAL).glo
21         mkdir -p $@
22         latex2html -split 5 -show_section_numbers -dir $(MANUAL).html $(MANUAL)
23
24 $(TSS).html: $(TSS).tex
25         mkdir -p $@
26         latex2html -split 0 -dir $(TSS).html $(TSS)
27
28 %.txt: %.lyx
29         lyx -e text $<
30         sed s/---/--/ $@ > $*.tmp
31         mv $*.tmp $@
32
33 %.pdf: %.tex %.dvi
34         which pdflatex > /dev/null && pdflatex $* || dvipdf $*
35
36 %.dvi: %.tex
37         latex $<
38
39 %.tex: %.lyx
40         lyx -e latex $<
41
42 %.ind: %.dvi
43         makeindex -s l2hidx.ist $*
44
45 %.glo: %.dvi
46         # the glossary, not implemented yet
47         # makeindex -s l2hglo.ist -o $@ $<
48
49 include clean.mk