* device/lib/z80/printf.c: Changed emitter to volatile to work
[fw/sdcc] / doc / Makefile
index 34bfa00b3d39c3dae1d0d8977d2efd2762c1272f..72b79f61bd24486920837f4f97b8f25791156f53 100644 (file)
@@ -1,21 +1,42 @@
-# Very simple Makefile for converting the design doc into something useful.
-TEX = latex
+include ../Makefile.common
 
-S = test_suite_spec.tex
-PDF = $(S:.tex=.pdf)
-PS = $(S:.tex=.ps)
-HTML = $(S:.tex=.html)
+MANUAL = sdccman
+TSS = test_suite_spec
 
-all: $(PS) $(PDF) $(HTML)
+all: $(MANUAL).html $(MANUAL).pdf $(MANUAL).txt \
+       $(TSS).html $(TSS).pdf $(TSS).txt
 
-%.ps: %.dvi
-       dvips -f.ps $< > $@
+install:
+       $(INSTALL) -d $(docdir)
+       cp -rf *.html *.txt *.pdf $(MANUAL).html $(TSS).html z80 avr $(docdir)
+
+uninstall:
+       rm -rf $(docdir)
+
+
+$(MANUAL).html: $(MANUAL).tex $(MANUAL).ind ;#$(MANUAL).glo
+       latex2html -split 5 -show_section_numbers -dir $(MANUAL).html $(MANUAL)
+
+$(TSS).html: $(TSS).tex
+       latex2html -split 0 -dir $(TSS).html $(TSS)
+
+%.txt: %.lyx
+       lyx -e text $<
 
 %.pdf: %.dvi
-       dvipdf $< $@
+       pdflatex $*
+
+%.dvi: %.tex
+       latex $<
+
+%.tex: %.lyx
+       lyx -e latex $<
+
+%.ind: %.dvi
+       makeindex -s l2hidx.ist $*
 
-%.html: %.tex
-       latex2html -no_subdir -split 0 $<
+%.glo: %.dvi
+       # the glossary, not implemented yet
+       # makeindex -s l2hglo.ist -o $@ $<
 
-clean:
-       rm -f $(PS) $(PDF) *.log *.aux *~
+include clean.mk