blob: 12068fb58e7bcba674853c279a4ba01f89dcb4d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
|
# This Makefile is for the Bash/documentation directory -*- text -*-.
#
# Copyright (C) 2003-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_VERSION = @PACKAGE_VERSION@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
#
SHELL = @MAKE_SHELL@
RM = rm -f
topdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
infodir = @infodir@
docdir = @docdir@
# set this to a directory name to have the HTML files installed
htmldir = @htmldir@
# Support an alternate destination root directory for package building
DESTDIR =
mandir = @mandir@
manpfx = man
man1ext = .1
man1dir = $(mandir)/$(manpfx)1
man3ext = .3
man3dir = $(mandir)/$(manpfx)3
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
BUILD_DIR = @BUILD_DIR@
SUPPORT_SRCDIR = $(topdir)/support
# bad style
RL_LIBDIR = $(topdir)/lib/readline
# unused
TEXINDEX = texindex
TEX = tex
MAKEINFO = makeinfo
TEXI2DVI = ${SUPPORT_SRCDIR}/texi2dvi
TEXI2HTML = ${SUPPORT_SRCDIR}/texi2html
MAN2HTML = ${BUILD_DIR}/support/man2html
HTMLPOST = ${srcdir}/htmlpost.sh
INFOPOST = ${srcdir}/infopost.sh
QUIETPS = #set this to -q to shut up dvips
PAPERSIZE = letter # change to a4 for A4-size paper
PSDPI = 600 # could be 300 if you like
DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky
# experimental; uses external texi2dvi for now; this needs pdftex to be present
TEXI2PDF = texi2dvi --pdf
TEXINPUTDIR = $(RL_LIBDIR)/doc
SET_TEXINPUTS = TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS
# These tools might not be available; they're not required
DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE}
PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@
MKDIRS = ${SUPPORT_SRCDIR}/mkdirs
# This should be a program that converts troff to an ascii-readable format
# added the -P -c for benefit of Mac OS X, which insists on adding colors if
# it's not present
NROFF = groff -Tascii -P -c
# This should be a program that converts troff to postscript
GROFF = groff
HSUSER = $(RL_LIBDIR)/doc/hsuser.texi
RLUSER = $(RL_LIBDIR)/doc/rluser.texi
BASHREF_FILES = $(srcdir)/bashref.texi $(srcdir)/fdl.texi $(srcdir)/version.texi
.SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html .pdf
.1.ps:
$(RM) $@
-${GROFF} -man $< > $@
.1.0:
$(RM) $@
-${NROFF} -man $< > $@
.1.html:
$(RM) $@
-${MAN2HTML} $< | ${HTMLPOST} > $@
.ms.ps:
$(RM) $@
-${GROFF} -ms $< > $@
.ms.txt:
$(RM) $@
-${NROFF} -ms $< > $@
.3.ps:
$(RM) $@
-${GROFF} -man $< > $@
.3.0:
$(RM) $@
-${NROFF} -man $< > $@
.3.html:
$(RM) $@
-${MAN2HTML} $< > $@
.ps.pdf:
$(RM) $@
-${PSPDF} $<
.dvi.pdf:
$(RM) $@
-${DVIPDF} $<
.dvi.ps:
${RM} $@
-${DVIPS} $<
#.texi.pdf:
# $(RM) $@
# -${TEXI2PDF} $<
all: ps info dvi text html $(MAN2HTML)
nodvi: ps info text html
everything: all pdf
PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps
DVIFILES = bashref.dvi bashref.ps
INFOFILES = bashref.info bash.info
MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0
HTMLFILES = bashref.html bash.html
PDFFILES = bash.pdf bashref.pdf article.pdf rose94.pdf
ps: ${PSFILES}
dvi: ${DVIFILES}
info: ${INFOFILES}
text: ${MAN0FILES}
html: ${HTMLFILES}
pdf: ${PDFFILES}
bashref.dvi: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bashref.texi || { ${RM} $@ ; exit 1; }
bashref.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
$(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
# experimental
bashref.pdf: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
${SET_TEXINPUTS} $(TEXI2PDF) $(srcdir)/bashref.texi || { ${RM} $@ ; exit 1; }
# can also use:
# $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi
bashref.html: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
$(MAKEINFO) --html --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
bash.info: bashref.info
${SHELL} ${INFOPOST} < $(srcdir)/bashref.info > $@ ; \
bash.txt: bash.1
bash.ps: bash.1
bash.html: bash.1
bashbug.ps: bashbug.1
builtins.ps: builtins.1 bash.1
rbash.ps: rbash.1 bash.1
bash.0: bash.1
bashbug.0: bashbug.1
builtins.0: builtins.1 bash.1
rbash.0: rbash.1 bash.1
article.ps: article.ms
bashref.ps: bashref.dvi
article.pdf: article.ps
#bashref.pdf: bashref.dvi
# experimental
bashref.pdf: bashref.texi
bash.pdf: bash.ps
rose94.pdf: rose94.ps
OTHER_DOCS = $(srcdir)/FAQ $(srcdir)/INTRO
OTHER_INSTALLED_DOCS = FAQ INTRO
$(MAN2HTML): ${topdir}/support/man2html.c
-( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html)
clean:
$(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \
*.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o
${RM} core *.core
mostlyclean: clean
$(RM) Makefile
distclean: clean maybe-clean
$(RM) Makefile
maintainer-clean: clean
${RM} ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}
${RM} ${CREATED_FAQ}
$(RM) Makefile
maybe-clean:
-if test "X$(topdir)" != "X$(BUILD_DIR)"; then \
$(RM) ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}; \
fi
installdirs:
-$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(man1dir)
-$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(infodir)
-$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(docdir)
-if test -n "$(htmldir)" ; then \
$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(htmldir) ; \
fi
install: info installdirs
-$(INSTALL_DATA) $(srcdir)/bash.1 $(DESTDIR)$(man1dir)/bash${man1ext}
-$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext}
-$(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir)
# uncomment the next lines to install the builtins man page
# sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
# -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
# -$(RM) $${TMPDIR:-/var/tmp}/builtins.1
-if test -f bash.info; then d=.; else d=$(srcdir); fi; \
$(INSTALL_DATA) $$d/bash.info $(DESTDIR)$(infodir)/bash.info
# run install-info if it is present to update the info directory
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \
else true; fi
# if htmldir is set, install the html files into that directory
-if test -n "${htmldir}" ; then \
$(INSTALL_DATA) $(srcdir)/bash.html $(DESTDIR)$(htmldir) ; \
$(INSTALL_DATA) $(srcdir)/bashref.html $(DESTDIR)$(htmldir) ; \
fi
install_builtins: installdirs
sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
-$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
-$(RM) $${TMPDIR:-/var/tmp}/builtins.1
install_everything: install install_builtins
install-html: html
-if test -n "${htmldir}" ; then \
$(INSTALL_DATA) $(srcdir)/bash.html $(DESTDIR)$(htmldir) ; \
$(INSTALL_DATA) $(srcdir)/bashref.html $(DESTDIR)$(htmldir) ; \
fi
uninstall:
-$(RM) $(DESTDIR)$(man1dir)/bash${man1ext} $(DESTDIR)$(man1dir)/bashbug${man1ext}
-$(RM) $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
$(RM) $(DESTDIR)$(infodir)/bash.info
# run install-info if it is present to update the info directory
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
install-info --delete --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \
else true; fi
-( cd $(DESTDIR)$(docdir) && $(RM) $(OTHER_INSTALLED_DOCS) )
-if test -n "$(htmldir)" ; then \
$(RM) $(DESTDIR)$(htmldir)/bash.html ; \
$(RM) $(DESTDIR)$(htmldir)/bashref.html ; \
fi
# for use by chet
CREATED_FAQ = faq.news faq.news2 faq.mail faq.version
faq: ${CREATED_FAQ}
faq.version: FAQ.version FAQ
sh mkfaqvers FAQ.version > $@
faq.headers.mail: FAQ.headers.mail FAQ
sh mkfaqvers FAQ.headers.mail > $@
faq.headers.news: FAQ.headers.news FAQ
sh mkfaqvers FAQ.headers.news > $@
faq.headers.news2: FAQ.headers.news2 FAQ
sh mkfaqvers FAQ.headers.news2 > $@
faq.news: FAQ faq.headers.news faq.version
$(RM) $@
cat faq.headers.news faq.version FAQ > $@
faq.news2: FAQ faq.headers.news2 faq.version
$(RM) $@
cat faq.headers.news2 faq.version FAQ > $@
faq.mail: FAQ faq.headers.mail faq.version
$(RM) $@
cat faq.headers.mail faq.version FAQ > $@
inst: bashref.texi
$(SHELL) ./mkinstall
cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL
$(RM) INSTALL
posix: bashref.texi
$(SHELL) ./mkposix
cmp -s POSIX ../POSIX || mv POSIX ../POSIX
$(RM) POSIX
rbash: bashref.texi
$(SHELL) ./mkrbash
cmp -s RBASH ../RBASH || mv RBASH ../RBASH
$(RM) RBASH
xdist: everything inst posix rbash
|