6 LATEX2HTML = @LATEX2HTML@
10 MAKEINDEX = @MAKEINDEX@
13 include ../Makefile.common
19 all: $(MANUAL).pdf $(MANUAL).html/index.html $(MANUAL).txt \
20 $(TSS).pdf $(TSS).html/index.html $(TSS).txt \
21 $(CDB).pdf $(CDB).html/index.html $(CDB).txt
24 $(INSTALL) -d $(DESTDIR)$(docdir)
25 cp -rf $(srcdir)/*.txt $(srcdir)/z80 $(srcdir)/avr $(DESTDIR)$(docdir)
26 txtfiles=`echo *.txt | grep -v '\*\.txt' || true`
27 if [ $(txtfiles) ]; then cp $(txtfiles) $(DESTDIR)$(docdir); fi
28 if [ -f $(MANUAL).html/index.html ]; then cp -rf $(MANUAL).html $(DESTDIR)$(docdir); fi
29 if [ -f $(TSS).html/index.html ]; then cp -rf $(TSS).html $(DESTDIR)$(docdir); fi
30 if [ -f $(CDB).html/index.html ]; then cp -rf $(CDB).html $(DESTDIR)$(docdir); fi
31 if [ -f $(MANUAL).pdf ]; then cp -rf $(MANUAL).pdf $(DESTDIR)$(docdir); fi
32 if [ -f $(TSS).pdf ]; then cp -rf $(TSS).pdf $(DESTDIR)$(docdir); fi
33 if [ -f $(CDB).pdf ]; then cp -rf $(CDB).pdf $(DESTDIR)$(docdir); fi
34 rm -rf `find $(DESTDIR)$(docdir) -name .svn -type d`
35 rm -f $(DESTDIR)$(docdir)/*/WARNINGS $(DESTDIR)$(docdir)/*/*.pl $(DESTDIR)$(docdir)/*/images.*
38 rm -rf $(DESTDIR)$(docdir)
40 $(MANUAL).html/index.html: $(MANUAL).tex ;#$(MANUAL).ind $(MANUAL).glo
42 @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto
43 @# fixes $(LATEX2HTML) problems with \tabularnewline
44 mv $< $(basename $<).orig.tex
45 sed -e 's,-\\/-,-\\/-\\/-,g' \
46 -e 's,\\tabularnewline$$,\\\\,g' < $(basename $<).orig.tex > $<
47 touch $< -r $(basename $<).orig.tex # avoid warning that *.tex is newer than *.aux
48 -$(LATEX2HTML) -split 5 -show_section_numbers -local_icons -info "" -dir $(MANUAL).html $(MANUAL)
49 mv $(basename $<).orig.tex $<
51 $(TSS).html/index.html: $(TSS).tex
53 @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto
54 @# fixes $(LATEX2HTML) problems with \tabularnewline
55 mv $< $(basename $<).orig.tex
56 sed -e 's,-\\/-,-\\/-\\/-,g' \
57 -e 's,\\tabularnewline$$,\\\\,g' < $(basename $<).orig.tex > $<
58 touch $< -r $(basename $<).orig.tex # avoid warning that *.tex is newer than *.aux
59 -$(LATEX2HTML) -split 0 -local_icons -info "" -dir $(TSS).html $(TSS)
60 mv $(basename $<).orig.tex $<
62 $(CDB).html/index.html: $(CDB).tex
64 @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto
65 @# fixes $(LATEX2HTML) problems with \tabularnewline
66 mv $< $(basename $<).orig.tex
67 sed -e 's,-\\/-,-\\/-\\/-,g' \
68 -e 's,\\tabularnewline$$,\\\\,g' < $(basename $<).orig.tex > $<
69 touch $< -r $(basename $<).orig.tex # avoid warning that *.tex is newer than *.aux
70 -$(LATEX2HTML) -split 0 -show_section_numbers -local_icons -info "" -dir $(CDB).html $(CDB)
71 mv $(basename $<).orig.tex $<
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 $@ $<
125 $(PDFOPT) $*.pdf tmp.pdf
130 rm -rf sdcc-doc sdcc-doc.tar.bz2
132 rsync -rCt avr z80 *.pdf *.txt $(srcdir)/*.txt sdcc-doc
134 for doc in $(MANUAL) $(TSS) $(CDB); do \
135 rsync -Rt $$doc.html/*.html $$doc.html/*.png $$doc.html/*.css sdcc-doc/; \
139 rsync -rCt $(top_srcdir)/as/doc/* sdcc-doc/as/
142 cd $(top_srcdir)/sim/ucsim/doc; rsync *.html *.jpg *.gif *.fig ../../../doc/sdcc-doc/ucsim/
144 tar -c sdcc-doc | bzip2 -9 > sdcc-doc.tar.bz2
146 include $(srcdir)/clean.mk