1 ##Copyright (C) 1991 Free Software Foundation, Inc.
3 # Makefile for GDB documentation.
4 # This file is part of GDB.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 idestdir = $(ddestdir)
27 # main GDB source directory
30 # Documentation (gdb.dvi) needs either GNU m4 or SysV m4;
31 # Berkeley/Sun don't have quite enough.
35 # where to find texinfo; GDB dist should include a recent one
36 TEXIDIR=${gdbdir}/../texinfo/fsf
38 # where to find makeinfo, preferably one designed for texinfo-2
41 # Where is the source dir for the READLINE library? Traditionally in .. or .
42 # (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
43 READLINE_DIR = ${gdbdir}/../readline
45 # Main GDB manual's source files
47 gdb.texinfo pretex.m4 none.m4 all.m4 gdbinv-m.m4 gdbinv-s.m4 gdbVN.m4
49 all: gdb.info gdbint.info
50 #all: gdb.info gdb.dvi refcard.dvi gdb-internals gdbint.dvi
53 for i in *.info* ; do \
54 echo Installing $$i... ; \
55 (cp $$i $(idestdir)/info/$$i.new \
56 && mv -f $(idestdir)/info/$$i.new $(idestdir)/info/$$i) \
61 rm -f gdb.dvi rdl-apps.texi gdb-all* gdb.info* gdbVN.m4
62 rm -f gdb-internals gdbint.?? gdbint.??? gdbint.info
63 rm -f refcard.ps refcard.dvi rcfonts.tex refcard.log *~
65 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
66 refcard.dvi : refcard.tex
67 rm -f rcfonts.tex; cp rc-cm.tex rcfonts.tex
68 TEXINPUTS=.:$$TEXINPUTS tex refcard.tex; rm -f refcard.log
71 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
72 refcard.ps : refcard.tex
73 rm -f rcfonts.tex; cp rc-ps.tex rcfonts.tex
74 TEXINPUTS=.:$$TEXINPUTS tex refcard.tex
75 dvips -t landscape refcard -o; rm -f refcard.dvi refcard.log
78 # Cover file for "Readline" appendices
79 rdl-apps.texi: ${READLINE_DIR}/inc-readline.texinfo \
80 ${READLINE_DIR}/inc-history.texinfo
82 echo "@include ${READLINE_DIR}/inc-readline.texinfo" >rdl-apps.texi
83 echo "@include ${READLINE_DIR}/inc-history.texinfo" >>rdl-apps.texi
85 # File to record current GDB version number (copied from main dir Makefile.in)
86 gdbVN.m4 : ${gdbdir}/Makefile.in
87 ( VER=`sed <${gdbdir}/Makefile.in -n 's/VERSION = //p'` ;\
88 echo "_define__(<_GDB_VN__>,$$VER)" > gdbVN.m4 )
90 # GDB MANUAL: texinfo source, created by preprocessing w/m4
91 # Be sure to not create a bad gdb-all.texi if ${M4} is missing or aborts...
92 gdb-all.texi: ${SFILES_DOCDIR}
94 ${M4} pretex.m4 none.m4 all.m4 gdb.texinfo >foobus.texinfo
96 mv foobus.texinfo gdb-all.texi
98 # GDB MANUAL: TeX dvi file
99 gdb.dvi : gdb-all.texi rdl-apps.texi
100 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex gdb-all.texi
102 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex gdb-all.texi
103 mv gdb-all.dvi gdb.dvi
104 rm -f gdb-all.?? gdb-all.???
106 # GDB MANUAL: info file
107 # We're using texinfo2, and older makeinfo's may not be able to
108 # cope with all the markup. In the meantime, we distribute the info
110 gdb.info: gdb-all.texi
111 $(MAKEINFO) -o gdb.info $(srcdir)/gdb-all.texi
113 # GDB INTERNALS MANUAL: TeX dvi file
114 gdbint.dvi : gdbint.texinfo
115 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex gdbint.texinfo
117 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex gdbint.texinfo
118 rm -f gdbint.?? gdbint.aux gdbint.cps gdbint.fns gdbint.kys \
119 gdbint.log gdbint.pgs gdbint.toc gdbint.tps gdbint.vrs
121 # GDB INTERNALS MANUAL: info file
122 gdb-internals: gdbint.info
124 gdbint.info: gdbint.texinfo
125 $(MAKEINFO) -o gdbint.info $(srcdir)/gdbint.texinfo
129 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
130 $(SHELL) ./config.status