Added gitignore entries needed to ignore derived objects generated from full build...
[bash.git] / doc / Makefile.in
blob493985b8da1ba7131749be7cc9c34db83299a849
1 # This Makefile is for the Bash/documentation directory -*- text -*-.
3 # Copyright (C) 2003-2009 Free Software Foundation, Inc.
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 3 of the License, or
8 # (at your option) any later version.
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.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 PACKAGE = @PACKAGE_NAME@
19 VERSION = @PACKAGE_VERSION@
21 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
22 PACKAGE_NAME = @PACKAGE_NAME@
23 PACKAGE_STRING = @PACKAGE_STRING@
24 PACKAGE_VERSION = @PACKAGE_VERSION@
27 SHELL = @MAKE_SHELL@
28 RM = rm -f
30 topdir = @top_srcdir@
31 srcdir = @srcdir@
32 VPATH = .:@srcdir@
34 prefix = @prefix@
35 exec_prefix = @exec_prefix@
37 datarootdir = @datarootdir@
39 infodir = @infodir@
41 # set this to a directory name to have the HTML files installed
42 htmldir = @htmldir@
44 # Support an alternate destination root directory for package building
45 DESTDIR =
47 mandir = @mandir@
48 manpfx = man
50 man1ext = .1
51 man1dir = $(mandir)/$(manpfx)1
52 man3ext = .3
53 man3dir = $(mandir)/$(manpfx)3
55 INSTALL = @INSTALL@
56 INSTALL_DATA = @INSTALL_DATA@
57 BUILD_DIR = @BUILD_DIR@
59 SUPPORT_SRCDIR = $(topdir)/support
61 # bad style
62 RL_LIBDIR = $(topdir)/lib/readline
64 # unused
65 TEXINDEX = texindex
66 TEX = tex
68 MAKEINFO = makeinfo
69 TEXI2DVI = ${SUPPORT_SRCDIR}/texi2dvi
70 TEXI2HTML = ${SUPPORT_SRCDIR}/texi2html
71 MAN2HTML = ${BUILD_DIR}/support/man2html
72 HTMLPOST = ${srcdir}/htmlpost.sh
73 INFOPOST = ${srcdir}/infopost.sh
74 QUIETPS = #set this to -q to shut up dvips
75 PAPERSIZE = letter # change to a4 for A4-size paper
76 PSDPI = 600 # could be 300 if you like
77 DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky
79 TEXINPUTDIR = $(RL_LIBDIR)/doc
80 SET_TEXINPUTS = TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS
82 # These tools might not be available; they're not required
83 DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE}
84 PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@
86 MKDIRS = ${SUPPORT_SRCDIR}/mkdirs
88 # This should be a program that converts troff to an ascii-readable format
89 NROFF = groff -Tascii
91 # This should be a program that converts troff to postscript
92 GROFF = groff
94 HSUSER = $(RL_LIBDIR)/doc/hsuser.texi
95 RLUSER = $(RL_LIBDIR)/doc/rluser.texi
97 BASHREF_FILES = $(srcdir)/bashref.texi $(srcdir)/fdl.texi $(srcdir)/version.texi
99 .SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html .pdf
101 .1.ps:
102 $(RM) $@
103 -${GROFF} -man $< > $@
105 .1.0:
106 $(RM) $@
107 -${NROFF} -man $< > $@
109 .1.html:
110 $(RM) $@
111 -${MAN2HTML} $< | ${HTMLPOST} > $@
113 .ms.ps:
114 $(RM) $@
115 -${GROFF} -ms $< > $@
117 .ms.txt:
118 $(RM) $@
119 -${NROFF} -ms $< > $@
121 .3.ps:
122 $(RM) $@
123 -${GROFF} -man $< > $@
125 .3.0:
126 $(RM) $@
127 -${NROFF} -man $< > $@
129 .3.html:
130 $(RM) $@
131 -${MAN2HTML} $< > $@
133 .ps.pdf:
134 $(RM) $@
135 -${PSPDF} $<
137 .dvi.pdf:
138 $(RM) $@
139 -${DVIPDF} $<
141 .dvi.ps:
142 ${RM} $@
143 -${DVIPS} $<
145 all: ps info dvi text html
146 nodvi: ps info text html
147 everything: all pdf
149 PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps
150 DVIFILES = bashref.dvi bashref.ps
151 INFOFILES = bashref.info
152 MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0
153 HTMLFILES = bashref.html bash.html
154 PDFFILES = bash.pdf bashref.pdf article.pdf rose94.pdf
156 ps: ${PSFILES}
157 dvi: ${DVIFILES}
158 info: ${INFOFILES}
159 text: ${MAN0FILES}
160 html: ${HTMLFILES}
161 pdf: ${PDFFILES}
163 bashref.dvi: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
164 ${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bashref.texi || { ${RM} $@ ; exit 1; }
166 bashref.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
167 $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
169 bashref.html: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
170 $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi
172 bash.info: bashref.info
173 ${SHELL} ${INFOPOST} < $(srcdir)/bashref.info > $@ ; \
175 bash.txt: bash.1
176 bash.ps: bash.1
177 bash.html: bash.1 $(MAN2HTML)
178 bashbug.ps: bashbug.1
179 builtins.ps: builtins.1 bash.1
180 rbash.ps: rbash.1 bash.1
181 bash.0: bash.1
182 bashbug.0: bashbug.1
183 builtins.0: builtins.1 bash.1
184 rbash.0: rbash.1 bash.1
185 article.ps: article.ms
187 bashref.ps: bashref.dvi
189 article.pdf: article.ps
190 bashref.pdf: bashref.dvi
191 bash.pdf: bash.ps
192 rose94.pdf: rose94.ps
194 $(MAN2HTML): ${topdir}/support/man2html.c
195 -( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html)
197 clean:
198 $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \
199 *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o
200 ${RM} core *.core
202 mostlyclean: clean
203 $(RM) Makefile
205 distclean: clean maybe-clean
206 $(RM) Makefile
208 maintainer-clean: clean
209 ${RM} ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}
210 ${RM} ${CREATED_FAQ}
211 $(RM) Makefile
213 maybe-clean:
214 -if test "X$(topdir)" != "X$(BUILD_DIR)"; then \
215 $(RM) ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}; \
218 installdirs:
219 -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(man1dir)
220 -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(infodir)
221 -if test -n "$(htmldir)" ; then \
222 $(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(htmldir) ; \
225 install: info installdirs bash.info
226 -$(INSTALL_DATA) $(srcdir)/bash.1 $(DESTDIR)$(man1dir)/bash${man1ext}
227 -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext}
228 # uncomment the next lines to install the builtins man page
229 # sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
230 # -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
231 # -$(RM) $${TMPDIR:-/var/tmp}/builtins.1
232 -if test -f bash.info; then d=.; else d=$(srcdir); fi; \
233 $(INSTALL_DATA) $$d/bash.info $(DESTDIR)$(infodir)/bash.info
234 # run install-info if it is present to update the info directory
235 if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
236 install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \
237 else true; fi
238 # if htmldir is set, install the html files into that directory
239 -if test -n "${htmldir}" ; then \
240 $(INSTALL_DATA) $(srcdir)/bash.html $(DESTDIR)$(htmldir) ; \
241 $(INSTALL_DATA) $(srcdir)/bashref.html $(DESTDIR)$(htmldir) ; \
244 install_builtins: installdirs
245 sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
246 -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
247 -$(RM) $${TMPDIR:-/var/tmp}/builtins.1
249 install_everything: install install_builtins
251 uninstall:
252 -$(RM) $(DESTDIR)$(man1dir)/bash${man1ext} $(DESTDIR)$(man1dir)/bashbug${man1ext}
253 -$(RM) $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
254 $(RM) $(DESTDIR)$(infodir)/bash.info
255 -if test -n "$(htmldir)" ; then \
256 $(RM) $(DESTDIR)$(htmldir)/bash.html ; \
257 $(RM) $(DESTDIR)$(htmldir)/bashref.html ; \
260 # for use by chet
261 CREATED_FAQ = faq.news faq.news2 faq.mail faq.version
263 faq: ${CREATED_FAQ}
265 faq.version: FAQ.version FAQ
266 sh mkfaqvers FAQ.version > $@
268 faq.headers.mail: FAQ.headers.mail FAQ
269 sh mkfaqvers FAQ.headers.mail > $@
271 faq.headers.news: FAQ.headers.news FAQ
272 sh mkfaqvers FAQ.headers.news > $@
274 faq.headers.news2: FAQ.headers.news2 FAQ
275 sh mkfaqvers FAQ.headers.news2 > $@
277 faq.news: FAQ faq.headers.news faq.version
278 $(RM) $@
279 cat faq.headers.news faq.version FAQ > $@
281 faq.news2: FAQ faq.headers.news2 faq.version
282 $(RM) $@
283 cat faq.headers.news2 faq.version FAQ > $@
285 faq.mail: FAQ faq.headers.mail faq.version
286 $(RM) $@
287 cat faq.headers.mail faq.version FAQ > $@
289 inst: bashref.texi
290 $(SHELL) ./mkinstall
291 cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL
292 $(RM) INSTALL
294 posix: bashref.texi
295 $(SHELL) ./mkposix
296 cmp -s POSIX ../POSIX || mv POSIX ../POSIX
297 $(RM) POSIX
299 rbash: bashref.texi
300 $(SH) ./mkrbash
301 cmp -s RBASH ../RBASH || mv RBASH ../RBASH
302 $(RM) RBASH
304 xdist: pdf inst posix rbash