Commit | Line | Data |
---|---|---|
d60d9f65 SS |
1 | # This makefile for Readline library documentation is in -*- text -*- mode. |
2 | # Emacs likes it that way. | |
f9267e15 EZ |
3 | |
4 | # Copyright (C) 1996 Free Software Foundation, Inc. | |
5 | ||
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, or (at your option) | |
9 | # any later version. | |
10 | ||
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. | |
15 | ||
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., 59 Temple Place, Suite 330, Boston, MA 02111 USA. | |
19 | ||
20 | topdir = @top_srcdir@ | |
d60d9f65 SS |
21 | srcdir = @srcdir@ |
22 | VPATH = .:@srcdir@ | |
23 | ||
24 | prefix = @prefix@ | |
25 | infodir = @infodir@ | |
26 | ||
27 | mandir = @mandir@ | |
f9267e15 EZ |
28 | manpfx = man |
29 | ||
30 | man1ext = 1 | |
31 | man1dir = $(mandir)/$(manpfx)$(man1ext) | |
32 | man3ext = 3 | |
33 | man3dir = $(mandir)/$(manpfx)$(man3ext) | |
d60d9f65 | 34 | |
c862e87b | 35 | SHELL = @MAKE_SHELL@ |
d60d9f65 SS |
36 | RM = rm -f |
37 | ||
f9267e15 EZ |
38 | INSTALL = @INSTALL@ |
39 | INSTALL_DATA = @INSTALL_DATA@ | |
40 | ||
41 | BUILD_DIR = @BUILD_DIR@ | |
d60d9f65 SS |
42 | TEXINPUTDIR = $(srcdir) |
43 | ||
f9267e15 | 44 | MAKEINFO = LANGUAGE= makeinfo |
d60d9f65 SS |
45 | TEXI2DVI = $(srcdir)/texi2dvi |
46 | TEXI2HTML = $(srcdir)/texi2html | |
47 | QUIETPS = #set this to -q to shut up dvips | |
f9267e15 EZ |
48 | PAPERSIZE = letter |
49 | PSDPI = 300 # I don't have any 600-dpi printers | |
50 | DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky | |
d60d9f65 SS |
51 | |
52 | RLSRC = $(srcdir)/rlman.texinfo $(srcdir)/rluser.texinfo \ | |
f9267e15 EZ |
53 | $(srcdir)/rltech.texinfo $(srcdir)/manvers.texinfo \ |
54 | $(srcdir)/rluserman.texinfo | |
d60d9f65 | 55 | HISTSRC = $(srcdir)/hist.texinfo $(srcdir)/hsuser.texinfo \ |
c862e87b | 56 | $(srcdir)/hstech.texinfo $(srcdir)/manvers.texinfo |
d60d9f65 SS |
57 | |
58 | # This should be a program that converts troff to an ascii-readable format | |
59 | NROFF = groff -Tascii | |
60 | ||
61 | # This should be a program that converts troff to postscript | |
62 | GROFF = groff | |
63 | ||
f9267e15 EZ |
64 | DVIOBJ = readline.dvi history.dvi rluserman.dvi |
65 | INFOOBJ = readline.info history.info rluserman.info | |
66 | PSOBJ = readline.ps history.ps rluserman.ps | |
67 | HTMLOBJ = readline.html history.html rluserman.html | |
d60d9f65 SS |
68 | TEXTOBJ = readline.0 |
69 | ||
f9267e15 | 70 | INTERMEDIATE_OBJ = rlman.dvi hist.dvi rluserman.dvi |
c862e87b | 71 | |
f9267e15 | 72 | CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ) $(TEXTOBJ) |
d60d9f65 SS |
73 | |
74 | .SUFFIXES: .0 .3 .ps .txt .dvi | |
75 | ||
76 | .3.0: | |
77 | $(RM) $@ | |
78 | -${NROFF} -man $< > $@ | |
79 | ||
80 | all: info dvi html ps text | |
81 | nodvi: info html text | |
82 | ||
83 | readline.dvi: $(RLSRC) | |
84 | TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texinfo | |
85 | mv rlman.dvi readline.dvi | |
86 | ||
87 | readline.info: $(RLSRC) | |
88 | $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texinfo | |
89 | ||
f9267e15 EZ |
90 | rluserman.dvi: $(RLSRC) |
91 | TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texinfo | |
92 | ||
93 | rluserman.info: $(RLSRC) | |
94 | $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texinfo | |
95 | ||
d60d9f65 SS |
96 | history.dvi: ${HISTSRC} |
97 | TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/hist.texinfo | |
98 | mv hist.dvi history.dvi | |
99 | ||
100 | history.info: ${HISTSRC} | |
101 | $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/hist.texinfo | |
102 | ||
103 | readline.ps: readline.dvi | |
104 | $(RM) $@ | |
105 | $(DVIPS) readline.dvi | |
106 | ||
f9267e15 EZ |
107 | rluserman.ps: rluserman.dvi |
108 | $(RM) $@ | |
109 | $(DVIPS) rluserman.dvi | |
110 | ||
d60d9f65 SS |
111 | history.ps: history.dvi |
112 | $(RM) $@ | |
113 | $(DVIPS) history.dvi | |
114 | ||
115 | readline.html: ${RLSRC} | |
c862e87b | 116 | $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo |
f9267e15 | 117 | sed -e 's:rlman.html:readline.html:g' rlman.html > readline.html |
c862e87b | 118 | $(RM) rlman.html |
d60d9f65 | 119 | |
f9267e15 EZ |
120 | rluserman.html: ${RLSRC} |
121 | $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texinfo | |
122 | ||
d60d9f65 | 123 | history.html: ${HISTSRC} |
c862e87b | 124 | $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/hist.texinfo |
f9267e15 | 125 | sed -e 's:hist.html:history.html:g' hist.html > history.html |
c862e87b | 126 | $(RM) hist.html |
d60d9f65 SS |
127 | |
128 | info: $(INFOOBJ) | |
129 | dvi: $(DVIOBJ) | |
130 | ps: $(PSOBJ) | |
131 | html: $(HTMLOBJ) | |
132 | text: $(TEXTOBJ) | |
133 | ||
134 | readline.0: readline.3 | |
135 | ||
136 | clean: | |
137 | $(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \ | |
f9267e15 | 138 | *.fns *.kys *.tps *.vrs *.bt *.bts *.o core |
d60d9f65 SS |
139 | |
140 | distclean: clean | |
141 | $(RM) $(CREATED_DOCS) | |
c862e87b | 142 | $(RM) $(INTERMEDIATE_OBJ) |
d60d9f65 SS |
143 | $(RM) Makefile |
144 | ||
145 | mostlyclean: clean | |
146 | ||
147 | maintainer-clean: clean | |
148 | $(RM) $(CREATED_DOCS) | |
c862e87b | 149 | $(RM) $(INTERMEDIATE_OBJ) |
d60d9f65 SS |
150 | $(RM) Makefile |
151 | ||
f9267e15 EZ |
152 | installdirs: $(topdir)/support/mkdirs |
153 | -$(SHELL) $(topdir)/support/mkdirs $(infodir) $(man3dir) | |
d60d9f65 | 154 | |
c862e87b | 155 | install: installdirs |
d60d9f65 SS |
156 | if test -f readline.info; then \ |
157 | ${INSTALL_DATA} readline.info $(infodir)/readline.info; \ | |
158 | else \ | |
159 | ${INSTALL_DATA} $(srcdir)/readline.info $(infodir)/readline.info; \ | |
160 | fi | |
f9267e15 EZ |
161 | if test -f rluserman.info; then \ |
162 | ${INSTALL_DATA} rluserman.info $(infodir)/rluserman.info; \ | |
163 | else \ | |
164 | ${INSTALL_DATA} $(srcdir)/rluserman.info $(infodir)/rluserman.info; \ | |
165 | fi | |
d60d9f65 SS |
166 | if test -f history.info; then \ |
167 | ${INSTALL_DATA} history.info $(infodir)/history.info; \ | |
168 | else \ | |
169 | ${INSTALL_DATA} $(srcdir)/history.info $(infodir)/history.info; \ | |
170 | fi | |
f9267e15 | 171 | -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ |
d60d9f65 SS |
172 | install-info --dir-file=$(infodir)/dir $(infodir)/readline.info ; \ |
173 | install-info --dir-file=$(infodir)/dir $(infodir)/history.info ; \ | |
174 | else true; fi | |
175 | -${INSTALL_DATA} $(srcdir)/readline.3 $(man3dir)/readline.3 | |
176 | ||
177 | uninstall: | |
178 | $(RM) $(infodir)/readline.info | |
f9267e15 | 179 | $(RM) $(infodir)/rluserman.info |
d60d9f65 SS |
180 | $(RM) $(infodir)/history.info |
181 | $(RM) $(man3dir)/readline.3 |