6 LATEX2HTML = @LATEX2HTML@
10 MAKEINDEX = @MAKEINDEX@
12 include ../Makefile.common
18 all: $(MANUAL).pdf $(MANUAL).html/index.html $(MANUAL).txt \
19 $(TSS).pdf $(TSS).html/index.html $(TSS).txt \
20 $(CDB).pdf $(CDB).html/index.html $(CDB).txt
23 $(INSTALL) -d $(DESTDIR)$(docdir)
24 cp -rf $(srcdir)/*.txt $(srcdir)/z80 $(srcdir)/avr $(DESTDIR)$(docdir)
25 txtfiles=`echo *.txt | grep -v '\*\.txt' || true`
26 if [ $(txtfiles) ]; then cp $(txtfiles) $(DESTDIR)$(docdir); fi
27 if [ -f $(MANUAL).html/index.html ]; then cp -rf $(MANUAL).html $(DESTDIR)$(docdir); fi
28 if [ -f $(TSS).html/index.html ]; then cp -rf $(TSS).html $(DESTDIR)$(docdir); fi
29 if [ -f $(CDB).html/index.html ]; then cp -rf $(CDB).html $(DESTDIR)$(docdir); fi
30 if [ -f $(MANUAL).pdf ]; then cp -rf $(MANUAL).pdf $(DESTDIR)$(docdir); fi
31 if [ -f $(TSS).pdf ]; then cp -rf $(TSS).pdf $(DESTDIR)$(docdir); fi
32 if [ -f $(CDB).pdf ]; then cp -rf $(CDB).pdf $(DESTDIR)$(docdir); fi
33 rm -rf `find $(DESTDIR)$(docdir) -name .svn -type d`
34 rm -f $(DESTDIR)$(docdir)/*/WARNINGS $(DESTDIR)$(docdir)/*/*.pl $(DESTDIR)$(docdir)/*/images.*
37 rm -rf $(DESTDIR)$(docdir)
39 $(MANUAL).html/index.html: $(MANUAL).tex $(MANUAL).ind ;#$(MANUAL).glo
41 @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto
42 @# fixes $(LATEX2HTML) problems with \tabularnewline
43 mv $< $(basename $<).orig.tex
44 sed -e 's,-\\/-,-\\/-\\/-,g' \
45 -e 's,\\tabularnewline$$,\\\\,g' < $(basename $<).orig.tex > $<
46 touch $< -r $(basename $<).orig.tex # avoid warning that *.tex is newer than *.aux
47 -$(LATEX2HTML) -split 5 -show_section_numbers -local_icons -info "" -dir $(MANUAL).html $(MANUAL)
48 mv $(basename $<).orig.tex $<
50 $(TSS).html/index.html: $(TSS).tex
52 @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto
53 @# fixes $(LATEX2HTML) problems with \tabularnewline
54 mv $< $(basename $<).orig.tex
55 sed -e 's,-\\/-,-\\/-\\/-,g' \
56 -e 's,\\tabularnewline$$,\\\\,g' < $(basename $<).orig.tex > $<
57 touch $< -r $(basename $<).orig.tex # avoid warning that *.tex is newer than *.aux
58 -$(LATEX2HTML) -split 0 -local_icons -info "" -dir $(TSS).html $(TSS)
59 mv $(basename $<).orig.tex $<
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 $<
73 @# $(LYX) will export the file in the directory of the $(LYX) file
74 @# if VPATH is used the $(LYX) file is copied first
75 if [ "$(srcdir)" != "." ]; then \
77 $(LYX) -e text $(notdir $<) ; \
83 %.pdf: %.tex %.dvi %.ind
85 # pdflatex creates documents for acrobat reader >= 5.0
86 # which $(PDFLATEX) > /dev/null && $(PDFLATEX) $* || $(DVIPDF) $*
93 @# rerun to in include aux
97 if [ "$(srcdir)" != "." ] ; then \
99 $(LYX) -e latex $(notdir $<) ; \
102 $(LYX) -e latex $< ; \
108 if [ -f $*.idx ] ; then \
113 # -$(MAKEINDEX) -s l2hidx.ist $*; \
116 # the glossary, not implemented yet
117 # $(MAKEINDEX) -s l2hglo.ist -o $@ $<
120 rm -rf sdcc-doc sdcc-doc.tar.bz2
122 rsync -rCt avr z80 *.pdf *.txt $(srcdir)/*.txt sdcc-doc
124 for doc in $(MANUAL) $(TSS) $(CDB); do \
125 rsync -Rt $$doc.html/*.html $$doc.html/*.png $$doc.html/*.css sdcc-doc/; \
129 rsync -rCt $(top_srcdir)/as/doc/* sdcc-doc/as/
132 cd $(top_srcdir)/sim/ucsim/doc; rsync *.html *.jpg *.gif *.fig ../../../doc/sdcc-doc/ucsim/
134 tar -c sdcc-doc | bzip2 -9 > sdcc-doc.tar.bz2
136 include $(srcdir)/clean.mk