Announce SDCC 4.5.0 RC3.
[sdcc.git] / sdcc / doc / Makefile.in
blob7ae62109ab23ddcce388f652713ee6b4f991ea03
1 VPATH = @srcdir@
2 srcdir = @srcdir@
4 LYX = @LYX@
5 LATEX = @LATEX@
6 LATEX2HTML = @LATEX2HTML@
7 PDFLATEX = @PDFLATEX@
8 MAKEINDEX = @MAKEINDEX@
9 DVIPDFM = @DVIPDFM@
11 PDFLATEXARGS = -file-line-error -halt-on-error
13 include ../Makefile.common
15 MANUAL = sdccman
17 all: $(MANUAL).pdf $(MANUAL).html/index.html $(MANUAL).txt
19 install:
20 $(INSTALL) -d $(DESTDIR)$(docdir)
21 cp -rf $(srcdir)/*.txt $(DESTDIR)$(docdir)
22 txtfiles=`echo *.txt | grep -v '\*\.txt' || true`
23 if [ $(txtfiles) ]; then cp $(txtfiles) $(DESTDIR)$(docdir); fi
24 if [ -f $(MANUAL).html/index.html ]; then cp -rf $(MANUAL).html $(DESTDIR)$(docdir); fi
25 if [ -f $(MANUAL).pdf ]; then cp -rf $(MANUAL).pdf $(DESTDIR)$(docdir); fi
26 rm -rf `find $(DESTDIR)$(docdir) -name .svn -type d`
27 rm -f $(DESTDIR)$(docdir)/*/images.*
29 uninstall:
30 rm -rf $(DESTDIR)$(docdir)
32 $(MANUAL).html/index.html: $(MANUAL).tex $(MANUAL).aux ;#$(MANUAL).ind $(MANUAL).glo
33 mkdir -p $(dir $@)
34 @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto
35 @# fixes $(LATEX2HTML) problems with \tabularnewline
36 sed -e 's,-\\/-,-\\/-\\/-,g' \
37 -e 's,\\tabularnewline$$,\\\\,g' < $< > $(dir $@)$(notdir $<)
38 cp $(MANUAL).aux $(dir $@)
39 -cd $(dir $@); $(LATEX2HTML) -split 5 -show_section_numbers -local_icons -info "" -nosubdir $(MANUAL) $(QUIET)
40 rm -f $(dir $@)WARNINGS $(dir $@)labels.pl $(dir $@)$(notdir $<) $(dir $@)$*.aux
42 %.html/index.html: %.tex %.aux
43 mkdir -p $(dir $@)
44 @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto
45 @# fixes $(LATEX2HTML) problems with \tabularnewline
46 sed -e 's,-\\/-,-\\/-\\/-,g' \
47 -e 's,\\tabularnewline$$,\\\\,g' < $< > $(dir $@)$(notdir $<)
48 cp $*.aux $(dir $@)
49 -cd $(dir $@); $(LATEX2HTML) -split 0 -local_icons -info "" -nosubdir $* $(QUIET)
50 rm -f $(dir $@)WARNINGS $(dir $@)labels.pl $(dir $@)$(notdir $<) $(dir $@)$*.aux
52 %.txt: %.lyx
53 @# $(LYX) will export the file in the directory of the $(LYX) file
54 @# if VPATH is used the $(LYX) file is copied first
55 if [ "$(srcdir)" != "." ]; then \
56 cp -f $(srcdir)/$(notdir $<) $(srcdir)/*.svg . ; \
58 $(LYX) -e text $(notdir $<);
60 %.pdf %.aux: %.tex %.dvi %.ind
61 which $(PDFLATEX) > /dev/null && $(PDFLATEX) $* || $(DVIPDFM) $*
63 #%.ps: %.pdf
64 # $(DVIPS) $*
66 %.dvi: %.tex
67 $(LATEX) $<
68 @# rerun to in include aux
69 $(LATEX) $<
71 %.tex: %.lyx
72 if [ "$(srcdir)" != "." ] ; then \
73 cp -f $(srcdir)/$(notdir $^) $(srcdir)/*.svg . ; \
75 echo $(VERSION) > sdcc_version
76 $(LYX) -e latex $(notdir $<);
78 %.ind: %.dvi
79 $(LATEX) $*
80 # is there an index?
81 if [ -f $*.idx ] ; then \
82 $(MAKEINDEX) -q $*; \
83 $(LATEX) $*; \
84 $(LATEX) $*; \
86 # -$(MAKEINDEX) -s l2hidx.ist $*; \
88 #%.glo: %.dvi
89 # # the glossary, not implemented yet
90 # # $(MAKEINDEX) -s l2hglo.ist -o $@ $<
92 #%.pdf %.aux: %.tex
93 # $(PDFLATEX) $* $(PDFLATEXARGS)
94 # [ ! -e "$*.idx" ] || $(MAKEINDEX) $* $(QUIET)
95 # $(PDFLATEX) $* $(PDFLATEXARGS)
96 # [ ! -e "$*.idx" ] || $(MAKEINDEX) $* $(QUIET)
97 # $(PDFLATEX) $* $(PDFLATEXARGS)
99 archive: all
100 rm -rf sdcc-doc sdcc-doc.tar.bz2
101 mkdir sdcc-doc
102 rsync -rCt *.pdf *.txt $(srcdir)/*.txt sdcc-doc
104 for doc in $(MANUAL); do \
105 rsync -Rt $$doc.html/*.html $$doc.html/*.png $$doc.html/*.css sdcc-doc/; \
106 done
108 mkdir sdcc-doc/as
109 rsync -rCt $(top_srcdir)/sdas/doc/* sdcc-doc/as/
111 mkdir sdcc-doc/ucsim
112 cd $(top_srcdir)/sim/ucsim/doc; rsync *.html *.jpg *.fig ../../../doc/sdcc-doc/ucsim/
114 tar -c sdcc-doc | bzip2 -9 > sdcc-doc.tar.bz2
116 include $(srcdir)/clean.mk