]>
Commit | Line | Data |
---|---|---|
1 | # This Makefile is for the Bash/documentation directory -*- text -*-. | |
2 | # | |
3 | # Copyright (C) 1996 Free Software Foundation, Inc. | |
4 | ||
5 | # This program is free software; you can redistribute it and/or modify | |
6 | # it under the terms of the GNU General Public License as published by | |
7 | # the Free Software Foundation; either version 2, or (at your option) | |
8 | # any later version. | |
9 | ||
10 | # This program is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | # GNU General Public License for more details. | |
14 | ||
15 | # You should have received a copy of the GNU General Public License | |
16 | # along with this program; if not, write to the Free Software | |
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. | |
18 | ||
19 | # | |
20 | SHELL = @MAKE_SHELL@ | |
21 | RM = rm -f | |
22 | ||
23 | topdir = @top_srcdir@ | |
24 | srcdir = @srcdir@ | |
25 | VPATH = .:@srcdir@ | |
26 | ||
27 | prefix = @prefix@ | |
28 | exec_prefix = @exec_prefix@ | |
29 | ||
30 | infodir = @infodir@ | |
31 | ||
32 | # set this to a directory name to have the HTML files installed | |
33 | htmldir = @htmldir@ | |
34 | ||
35 | mandir = @mandir@ | |
36 | manpfx = man | |
37 | ||
38 | man1ext = 1 | |
39 | man1dir = $(mandir)/$(manpfx)$(man1ext) | |
40 | man3ext = 3 | |
41 | man3dir = $(mandir)/$(manpfx)$(man3ext) | |
42 | ||
43 | INSTALL = @INSTALL@ | |
44 | INSTALL_DATA = @INSTALL_DATA@ | |
45 | BUILD_DIR = @BUILD_DIR@ | |
46 | ||
47 | # bad style | |
48 | RL_LIBDIR = $(topdir)/lib/readline | |
49 | ||
50 | # unused | |
51 | TEXINDEX = texindex | |
52 | TEX = tex | |
53 | ||
54 | MAKEINFO = makeinfo | |
55 | TEXI2DVI = ${topdir}/support/texi2dvi | |
56 | TEXI2HTML = ${topdir}/support/texi2html | |
57 | MAN2HTML = ${BUILD_DIR}/support/man2html | |
58 | HTMLPOST = ${srcdir}/htmlpost.sh | |
59 | QUIETPS = #set this to -q to shut up dvips | |
60 | PAPERSIZE = letter # change to a4 for A4-size paper | |
61 | PSDPI = 300 # could be 600 if you like | |
62 | DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky | |
63 | TEXINPUTDIR = $(RL_LIBDIR)/doc | |
64 | ||
65 | MKDIRS = ${topdir}/support/mkdirs | |
66 | ||
67 | # This should be a program that converts troff to an ascii-readable format | |
68 | NROFF = groff -Tascii | |
69 | ||
70 | # This should be a program that converts troff to postscript | |
71 | GROFF = groff | |
72 | ||
73 | HSUSER = $(RL_LIBDIR)/doc/hsuser.texinfo | |
74 | RLUSER = $(RL_LIBDIR)/doc/rluser.texinfo | |
75 | ||
76 | .SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html | |
77 | ||
78 | .1.ps: | |
79 | $(RM) $@ | |
80 | -${GROFF} -man $< > $@ | |
81 | ||
82 | .1.0: | |
83 | $(RM) $@ | |
84 | -${NROFF} -man $< > $@ | |
85 | ||
86 | .1.html: | |
87 | $(RM) $@ | |
88 | -${MAN2HTML} $< | ${HTMLPOST} > $@ | |
89 | ||
90 | .ms.ps: | |
91 | $(RM) $@ | |
92 | -${GROFF} -ms $< > $@ | |
93 | ||
94 | .ms.txt: | |
95 | $(RM) $@ | |
96 | -${NROFF} -ms $< > $@ | |
97 | ||
98 | .3.ps: | |
99 | $(RM) $@ | |
100 | -${GROFF} -man $< > $@ | |
101 | ||
102 | .3.0: | |
103 | $(RM) $@ | |
104 | -${NROFF} -man $< > $@ | |
105 | ||
106 | .3.html: | |
107 | $(RM) $@ | |
108 | -${MAN2HTML} $< > $@ | |
109 | ||
110 | all: ps info dvi text html | |
111 | nodvi: ps info text html | |
112 | ||
113 | PSFILES = bash.ps bashbug.ps readline.ps article.ps builtins.ps rbash.ps | |
114 | DVIFILES = bashref.dvi bashref.ps | |
115 | INFOFILES = bashref.info | |
116 | MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0 readline.0 | |
117 | HTMLFILES = bashref.html bash.html | |
118 | ||
119 | ps: ${PSFILES} | |
120 | dvi: ${DVIFILES} | |
121 | info: ${INFOFILES} | |
122 | text: ${MAN0FILES} | |
123 | html: ${HTMLFILES} | |
124 | ||
125 | bashref.dvi: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER) | |
126 | TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/bashref.texi | |
127 | ||
128 | bashref.ps: bashref.dvi | |
129 | $(RM) $@ | |
130 | $(DVIPS) bashref.dvi | |
131 | ||
132 | bashref.info: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER) | |
133 | $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi | |
134 | ||
135 | bashref.html: bashref.texi $(HSUSER) $(RLUSER) | |
136 | $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi | |
137 | ||
138 | new-bashref.dvi: $(srcdir)/new-bashref.texi $(HSUSER) $(RLUSER) | |
139 | TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/new-bashref.texi | |
140 | ||
141 | new-bashref.ps: new-bashref.dvi | |
142 | $(RM) $@ | |
143 | $(DVIPS) new-bashref.dvi | |
144 | ||
145 | new-bashref.info: $(srcdir)/new-bashref.texi $(HSUSER) $(RLUSER) | |
146 | $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/new-bashref.texi | |
147 | ||
148 | bash.dvi: bash.texinfo $(HSUSER) $(RLUSER) | |
149 | TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) bash.texinfo | |
150 | ||
151 | bashman.ps: bash.dvi | |
152 | $(RM) $@ | |
153 | $(DVIPS) bash.dvi | |
154 | ||
155 | bash.txt: bash.1 | |
156 | bash.ps: bash.1 | |
157 | bash.html: bash.1 $(MAN2HTML) | |
158 | bashbug.ps: bashbug.1 | |
159 | builtins.ps: builtins.1 bash.1 | |
160 | rbash.ps: rbash.1 bash.1 | |
161 | bash.0: bash.1 | |
162 | bashbug.0: bashbug.1 | |
163 | builtins.0: builtins.1 bash.1 | |
164 | rbash.0: rbash.1 bash.1 | |
165 | readline.0: readline.3 | |
166 | readline.ps: readline.3 | |
167 | article.ps: article.ms | |
168 | ||
169 | $(MAN2HTML): ${topdir}/support/man2html.c | |
170 | -( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html) | |
171 | ||
172 | CREATED_FAQ = faq.news faq.news2 faq.mail faq.version | |
173 | ||
174 | faq: ${CREATED_FAQ} | |
175 | ||
176 | faq.version: FAQ.version FAQ | |
177 | sh mkfaqvers FAQ.version > $@ | |
178 | ||
179 | faq.headers.mail: FAQ.headers.mail FAQ | |
180 | sh mkfaqvers FAQ.headers.mail > $@ | |
181 | ||
182 | faq.headers.news: FAQ.headers.news FAQ | |
183 | sh mkfaqvers FAQ.headers.news > $@ | |
184 | ||
185 | faq.headers.news2: FAQ.headers.news2 FAQ | |
186 | sh mkfaqvers FAQ.headers.news2 > $@ | |
187 | ||
188 | faq.news: FAQ faq.headers.news faq.version | |
189 | $(RM) $@ | |
190 | cat faq.headers.news faq.version FAQ > $@ | |
191 | ||
192 | faq.news2: FAQ faq.headers.news2 faq.version | |
193 | $(RM) $@ | |
194 | cat faq.headers.news2 faq.version FAQ > $@ | |
195 | ||
196 | faq.mail: FAQ faq.headers.mail faq.version | |
197 | $(RM) $@ | |
198 | cat faq.headers.mail faq.version FAQ > $@ | |
199 | ||
200 | clean: | |
201 | $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \ | |
202 | *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o | |
203 | ${RM} core *.core | |
204 | ||
205 | distclean mostlyclean: clean | |
206 | $(RM) Makefile | |
207 | ||
208 | maintainer-clean: clean | |
209 | ${RM} ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES} | |
210 | ${RM} ${CREATED_FAQ} | |
211 | $(RM) Makefile | |
212 | ||
213 | installdirs: | |
214 | -test -d $(man1dir) || $(SHELL) ${MKDIRS} $(man1dir) | |
215 | # uncomment the next line to create the directory for the readline man page | |
216 | # -test -d $(man3dir) || $(SHELL) ${MKDIRS} $(man3dir) | |
217 | -test -d $(infodir) || $(SHELL) ${MKDIRS} $(infodir) | |
218 | -if [ -n "$(htmldir)" ]; then \ | |
219 | test -d $(htmldir) || $(SHELL) ${MKDIRS} $(htmldir) ; \ | |
220 | fi | |
221 | ||
222 | install: info installdirs | |
223 | -$(INSTALL_DATA) $(srcdir)/bash.1 $(man1dir)/bash.${man1ext} | |
224 | -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(man1dir)/bashbug.${man1ext} | |
225 | # uncomment the next line to install the readline man page | |
226 | # -$(INSTALL_DATA) $(srcdir)/readline.3 $(man3dir)/readline.${man3ext} | |
227 | # uncomment the next line to install the builtins man page | |
228 | # $(INSTALL_DATA) $(srcdir)/builtins.1 $(man1dir)/bash_builtins.${man1ext} | |
229 | -$(INSTALL_DATA) $(srcdir)/bashref.info $(infodir)/bash.info | |
230 | # run install-info if it is present to update the info directory | |
231 | if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ | |
232 | install-info --dir-file=$(infodir)/dir $(infodir)/bash.info; \ | |
233 | else true; fi | |
234 | # if htmldir is set, install the html files into that directory | |
235 | -if [ -n "${htmldir}" ]; then \ | |
236 | $(INSTALL_DATA) $(srcdir)/bash.html $(htmldir) ; \ | |
237 | $(INSTALL_DATA) $(srcdir)/bashref.html $(htmldir) ; \ | |
238 | fi | |
239 | ||
240 | uninstall: | |
241 | -$(RM) $(man1dir)/bash.${man1ext} $(man1dir)/bashbug.${man1ext} | |
242 | -$(RM) $(man3dir)/readline.${man3ext} | |
243 | $(RM) $(infodir)/bash.info | |
244 | -if [ -n "$(htmldir)" ]; then \ | |
245 | $(RM) $(htmldir)/bash.html ; \ | |
246 | $(RM) $(htmldir)/bashref.html ; \ | |
247 | fi | |
248 | ||
249 | # for use by chet | |
250 | inst: bashref.texi | |
251 | $(SHELL) ./mkinstall | |
252 | cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL | |
253 | $(RM) INSTALL | |
254 | ||
255 | posix: bashref.texi | |
256 | $(SHELL) ./mkposix | |
257 | cmp -s POSIX.NOTES ../CWRU/POSIX.NOTES || mv POSIX.NOTES ../CWRU/POSIX.NOTES | |
258 | $(RM) POSIX.NOTES |