5 LATEX2HTML = @LATEX2HTML@
7 MAKEINDEX = @MAKEINDEX@
10 include ../Makefile.common
16 all: $(MANUAL).pdf $(MANUAL).html/index.html $(MANUAL).txt \
17 $(TSS).pdf $(TSS).html/index.html $(TSS).txt \
18 $(CDB).pdf $(CDB).html/index.html $(CDB).txt
21 $(INSTALL) -d $(DESTDIR)$(docdir)
22 cp -rf $(srcdir)/*.txt $(srcdir)/z80 $(srcdir)/avr $(DESTDIR)$(docdir)
23 txtfiles=`echo *.txt | grep -v '\*\.txt' || true`
24 if [ $(txtfiles) ]; then cp $(txtfiles) $(DESTDIR)$(docdir); fi
25 if [ -f $(MANUAL).html/index.html ]; then cp -rf $(MANUAL).html $(DESTDIR)$(docdir); fi
26 if [ -f $(TSS).html/index.html ]; then cp -rf $(TSS).html $(DESTDIR)$(docdir); fi
27 if [ -f $(CDB).html/index.html ]; then cp -rf $(CDB).html $(DESTDIR)$(docdir); fi
28 if [ -f $(MANUAL).pdf ]; then cp -rf $(MANUAL).pdf $(DESTDIR)$(docdir); fi
29 if [ -f $(TSS).pdf ]; then cp -rf $(TSS).pdf $(DESTDIR)$(docdir); fi
30 if [ -f $(CDB).pdf ]; then cp -rf $(CDB).pdf $(DESTDIR)$(docdir); fi
31 rm -rf `find $(DESTDIR)$(docdir) -name .svn -type d`
32 rm -f $(DESTDIR)$(docdir)/*/images.*
35 rm -rf $(DESTDIR)$(docdir)
37 $(MANUAL).html/index.html: $(MANUAL).tex ;#$(MANUAL).ind $(MANUAL).glo
39 @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto
40 @# fixes $(LATEX2HTML) problems with \tabularnewline
41 mv $< $(basename $<).orig.tex
42 sed -e 's,-\\/-,-\\/-\\/-,g' \
43 -e 's,\\tabularnewline$$,\\\\,g' < $(basename $<).orig.tex > $<
44 touch $< -r $(basename $<).orig.tex # avoid warning that *.tex is newer than *.aux
45 -$(LATEX2HTML) -split 5 -show_section_numbers -local_icons -info "" -dir $(MANUAL).html $(MANUAL)
46 mv $(basename $<).orig.tex $<
47 rm -f $(MANUAL).html/WARNINGS $(MANUAL).html/labels.pl
49 $(TSS).html/index.html: $(TSS).tex
51 @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto
52 @# fixes $(LATEX2HTML) problems with \tabularnewline
53 mv $< $(basename $<).orig.tex
54 sed -e 's,-\\/-,-\\/-\\/-,g' \
55 -e 's,\\tabularnewline$$,\\\\,g' < $(basename $<).orig.tex > $<
56 touch $< -r $(basename $<).orig.tex # avoid warning that *.tex is newer than *.aux
57 -$(LATEX2HTML) -split 0 -local_icons -info "" -dir $(TSS).html $(TSS)
58 mv $(basename $<).orig.tex $<
59 rm -f $(TSS).html/WARNINGS $(TSS).html/labels.pl
61 $(CDB).html/index.html: $(CDB).tex
63 @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto
64 @# fixes $(LATEX2HTML) problems with \tabularnewline
65 mv $< $(basename $<).orig.tex
66 sed -e 's,-\\/-,-\\/-\\/-,g' \
67 -e 's,\\tabularnewline$$,\\\\,g' < $(basename $<).orig.tex > $<
68 touch $< -r $(basename $<).orig.tex # avoid warning that *.tex is newer than *.aux
69 -$(LATEX2HTML) -split 0 -show_section_numbers -local_icons -info "" -dir $(CDB).html $(CDB)
70 mv $(basename $<).orig.tex $<
71 rm -f $(CDB).html/WARNINGS $(CDB).html/labels.pl
74 @# $(LYX) will export the file in the directory of the $(LYX) file
75 @# if VPATH is used the $(LYX) file is copied first
76 if [ "$(srcdir)" != "." ]; then \
78 $(LYX) -e text $(notdir $<) ; \
84 #%.pdf: %.tex %.dvi %.ind
86 ## pdflatex creates documents for acrobat reader >= 5.0
87 ## which $(PDFLATEX) > /dev/null && $(PDFLATEX) $* || $(DVIPDF) $*
94 # @# rerun to in include aux
98 if [ "$(srcdir)" != "." ] ; then \
100 $(LYX) -e latex $(notdir $<) ; \
103 $(LYX) -e latex $< ; \
108 # # is there an index?
109 # if [ -f $*.idx ] ; then \
114 ## -$(MAKEINDEX) -s l2hidx.ist $*; \
117 # # the glossary, not implemented yet
118 # # $(MAKEINDEX) -s l2hglo.ist -o $@ $<
126 $(PDFOPT) $*.pdf tmp.pdf
131 rm -rf sdcc-doc sdcc-doc.tar.bz2
133 rsync -rCt avr z80 *.pdf *.txt $(srcdir)/*.txt sdcc-doc
135 for doc in $(MANUAL) $(TSS) $(CDB); do \
136 rsync -Rt $$doc.html/*.html $$doc.html/*.png $$doc.html/*.css sdcc-doc/; \
140 rsync -rCt $(top_srcdir)/as/doc/* sdcc-doc/as/
143 cd $(top_srcdir)/sim/ucsim/doc; rsync *.html *.jpg *.gif *.fig ../../../doc/sdcc-doc/ucsim/
145 tar -c sdcc-doc | bzip2 -9 > sdcc-doc.tar.bz2
147 include $(srcdir)/clean.mk