1 include ../Makefile.common
4 LYXFLAGS += -sysdir $(LYX_SYSDIR)
11 SOURCES = $(MANUAL).lyx $(TSS).lyx $(CDB).lyx
13 TXT = $(SOURCES:.lyx=.txt)
14 PDF = $(SOURCES:.lyx=.pdf)
15 TEX = $(SOURCES:.lyx=.tex)
16 HTML_DIR = $(SOURCES:.lyx=.html)
17 HTML_INDEX = $(SOURCES:.lyx=.html/index.html)
19 all: $(TXT) $(PDF) $(HTML_INDEX)
22 $(INSTALL) -d $(DESTDIR)$(docdir)
23 cp -rf *.txt z80 avr $(DESTDIR)$(docdir)
24 if [ -f $(MANUAL).html/index.html ]; then cp -rf $(MANUAL).html $(DESTDIR)$(docdir); fi
25 if [ -f $(TSS).html/index.html ]; then cp -rf $(TSS).html $(DESTDIR)$(docdir); fi
26 if [ -f $(CDB).html/index.html ]; then cp -rf $(CDB).html $(DESTDIR)$(docdir); fi
27 if [ -f $(MANUAL).pdf ]; then cp -rf $(MANUAL).pdf $(DESTDIR)$(docdir); fi
28 if [ -f $(TSS).pdf ]; then cp -rf $(TSS).pdf $(DESTDIR)$(docdir); fi
29 if [ -f $(CDB).pdf ]; then cp -rf $(CDB).pdf $(DESTDIR)$(docdir); fi
30 rm -rf `find $(DESTDIR)$(docdir) -name .svn -type d`
31 rm -f $(DESTDIR)$(docdir)/*/WARNINGS $(DESTDIR)$(docdir)/*/*.pl $(DESTDIR)$(docdir)/*/images.*
34 rm -rf $(DESTDIR)$(docdir)
36 $(MANUAL).html/index.html: $(MANUAL).tex $(MANUAL).ind
39 # fixes latex2html problems with two consecutive dashes for long-options: --stack-auto
40 # fixes latex2html problems with \tabularnewline
41 mv $< `basename $< .tex`.orig.tex
42 sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex | \
43 sed 's,\\tabularnewline$$,\\\\,g' > $<
44 -latex2html -show_section_numbers -split 5 -local_icons -dir $(MANUAL).html `basename $<`
45 mv `basename $< .tex`.orig.tex $<
46 rm -f $(MANUAL).html/WARNINGS $(MANUAL).html/labels.pl
48 $(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 $< .tex`.orig.tex
54 sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex | \
55 sed 's,\\tabularnewline$$,\\\\,g' > $<
56 -latex2html -split 0 -local_icons -dir $(TSS).html `basename $<`
57 mv `basename $< .tex`.orig.tex $<
58 rm -f $(TSS).html/WARNINGS $(TSS).html/labels.pl
60 $(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 $< .tex`.orig.tex
66 sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex | \
67 sed 's,\\tabularnewline$$,\\\\,g' > $<
68 -latex2html -show_section_numbers -split 0 -local_icons -dir $(CDB).html `basename $<`
69 mv `basename $< .tex`.orig.tex $<
70 rm -f $(CDB).html/WARNINGS $(CDB).html/labels.pl
73 lyx -e text $(LYXFLAGS) $<
76 @echo "### Create pdf from tex: $< -> $@"
92 lyx -e latex $< $(LYXFLAGS)
97 ## -makeindex -s l2hidx.ist $*
102 # # the glossary, not implemented yet
103 # # makeindex -s l2hglo.ist -o $@ $<
106 rm -rf sdcc-doc sdcc-doc.tar.bz2
108 rsync -rCt avr z80 *.pdf *.txt sdcc-doc
110 for doc in $(MANUAL) $(TSS) $(CDB); do \
111 rsync -Rt $$doc.html/*.html $$doc.html/*.png $$doc.html/*.css sdcc-doc/; \
115 rsync -rCt ../as/doc/* sdcc-doc/as/
118 cd ../sim/ucsim/doc; rsync *.html *.jpg *.gif *.fig ../../../doc/sdcc-doc/ucsim/
120 tar -c sdcc-doc | bzip2 -9 > sdcc-doc.tar.bz2