source: trunk/third/bash/doc/Makefile.in @ 21281

Revision 21281, 7.1 KB checked in by zacheiss, 20 years ago (diff)
Fix merge; still install bash info page.
Line 
1# This Makefile is for the Bash/documentation directory -*- text -*-.
2#
3# Copyright (C) 2003 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
19PACKAGE = @PACKAGE_NAME@
20VERSION = @PACKAGE_VERSION@
21
22PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
23PACKAGE_NAME = @PACKAGE_NAME@
24PACKAGE_STRING = @PACKAGE_STRING@
25PACKAGE_VERSION = @PACKAGE_VERSION@
26
27#
28SHELL = @MAKE_SHELL@
29RM          = rm -f
30
31topdir = @top_srcdir@
32srcdir = @srcdir@
33VPATH = .:@srcdir@
34
35prefix = @prefix@
36exec_prefix = @exec_prefix@
37
38infodir = @infodir@
39
40# set this to a directory name to have the HTML files installed
41htmldir = @htmldir@
42
43# Support an alternate destination root directory for package building
44DESTDIR =
45
46mandir = @mandir@
47manpfx = man
48
49man1ext = .1
50man1dir = $(mandir)/$(manpfx)1
51man3ext = .3
52man3dir = $(mandir)/$(manpfx)3
53
54INSTALL = @INSTALL@
55INSTALL_DATA = @INSTALL_DATA@
56BUILD_DIR = @BUILD_DIR@
57
58SUPPORT_SRCDIR = $(topdir)/support
59
60# bad style
61RL_LIBDIR = $(topdir)/lib/readline
62
63# unused
64TEXINDEX    = texindex
65TEX         = tex
66
67MAKEINFO    = makeinfo
68TEXI2DVI    = ${SUPPORT_SRCDIR}/texi2dvi
69TEXI2HTML   = ${SUPPORT_SRCDIR}/texi2html
70MAN2HTML    = ${BUILD_DIR}/support/man2html
71HTMLPOST    = ${srcdir}/htmlpost.sh
72INFOPOST    = ${srcdir}/infopost.sh
73QUIETPS     = #set this to -q to shut up dvips
74PAPERSIZE   = letter    # change to a4 for A4-size paper
75PSDPI       = 600       # could be 300 if you like
76DVIPS       = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@        # tricky
77
78TEXINPUTDIR = $(RL_LIBDIR)/doc
79SET_TEXINPUTS = TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS
80
81# These tools might not be available; they're not required
82DVIPDF      = dvipdfm -o $@ -p ${PAPERSIZE}
83PSPDF       = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@
84
85MKDIRS      = ${SUPPORT_SRCDIR}/mkdirs
86
87# This should be a program that converts troff to an ascii-readable format
88NROFF       = groff -Tascii
89
90# This should be a program that converts troff to postscript
91GROFF       = groff
92
93HSUSER      = $(RL_LIBDIR)/doc/hsuser.texi
94RLUSER      = $(RL_LIBDIR)/doc/rluser.texi
95
96BASHREF_FILES = $(srcdir)/bashref.texi $(srcdir)/version.texi
97
98.SUFFIXES:      .0 .1 .3 .ms .ps .txt .dvi .html .pdf
99
100.1.ps:
101        $(RM) $@
102        -${GROFF} -man $< > $@
103
104.1.0:
105        $(RM) $@
106        -${NROFF} -man $< > $@
107
108.1.html:
109        $(RM) $@
110        -${MAN2HTML} $< | ${HTMLPOST} > $@
111
112.ms.ps:
113        $(RM) $@
114        -${GROFF} -ms $< > $@
115
116.ms.txt:
117        $(RM) $@
118        -${NROFF} -ms $< > $@
119
120.3.ps:
121        $(RM) $@
122        -${GROFF} -man $< > $@
123
124.3.0:
125        $(RM) $@
126        -${NROFF} -man $< > $@
127
128.3.html:
129        $(RM) $@
130        -${MAN2HTML} $< > $@
131
132.ps.pdf:
133        $(RM) $@
134        -${PSPDF} $<
135
136.dvi.pdf:
137        $(RM) $@
138        -${DVIPDF} $<
139
140.dvi.ps:
141        ${RM} $@
142        -${DVIPS} $<
143
144all: ps info dvi text html
145nodvi: ps info text html
146
147PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps
148DVIFILES = bashref.dvi bashref.ps
149INFOFILES = bashref.info
150MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0
151HTMLFILES = bashref.html bash.html
152PDFFILES = bash.pdf bashref.pdf article.pdf rose94.pdf
153
154ps: ${PSFILES}
155dvi: ${DVIFILES}
156info: ${INFOFILES}
157text: ${MAN0FILES}
158html: ${HTMLFILES}
159pdf: ${PDFFILES}
160
161bashref.dvi: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
162        ${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bashref.texi
163
164bashref.html: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
165        $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi
166
167bash.info: bashref.info
168        ${SHELL} ${INFOPOST} < $(srcdir)/bashref.info > $@ ; \
169
170bash.txt: bash.1
171bash.ps: bash.1
172bash.html: bash.1 $(MAN2HTML)
173bashbug.ps: bashbug.1
174builtins.ps: builtins.1 bash.1
175rbash.ps: rbash.1 bash.1
176bash.0: bash.1
177bashbug.0: bashbug.1
178builtins.0: builtins.1 bash.1
179rbash.0: rbash.1 bash.1
180article.ps: article.ms
181
182bashref.ps: bashref.dvi
183
184article.pdf: article.ps
185bashref.pdf: bashref.dvi
186bash.pdf: bash.ps
187rose94.pdf: rose94.ps
188
189$(MAN2HTML):    ${topdir}/support/man2html.c
190        -( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html)
191
192clean:
193        $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \
194                *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o
195        ${RM} core *.core
196
197mostlyclean: clean
198        $(RM) Makefile
199
200distclean: clean maybe-clean
201        $(RM) Makefile
202
203maintainer-clean:       clean
204        ${RM} ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}
205        ${RM} ${CREATED_FAQ}
206        $(RM) Makefile
207
208maybe-clean:
209        -if test "X$(topdir)" != "X$(BUILD_DIR)"; then \
210                $(RM) ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}; \
211        fi
212
213installdirs:
214        -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(man1dir)
215        -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(infodir)
216        -if test -n "$(htmldir)" ; then \
217                $(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(htmldir) ; \
218        fi
219       
220install: info installdirs bash.info
221        -$(INSTALL_DATA) $(srcdir)/bash.1 $(DESTDIR)$(man1dir)/bash${man1ext}
222# uncomment the next line to install the builtins man page
223#       -$(INSTALL_DATA) $(srcdir)/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
224        -$(INSTALL_DATA) $(srcdir)/bash.info $(DESTDIR)$(infodir)/bash.info
225# run install-info if it is present to update the info directory
226        if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
227                install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \
228        else true; fi
229# if htmldir is set, install the html files into that directory
230        -if test -n "${htmldir}" ; then \
231                $(INSTALL_DATA) $(srcdir)/bash.html $(DESTDIR)$(htmldir) ; \
232                $(INSTALL_DATA) $(srcdir)/bashref.html $(DESTDIR)$(htmldir) ; \
233        fi
234
235uninstall:
236        -$(RM) $(DESTDIR)$(man1dir)/bash${man1ext} $(DESTDIR)$(man1dir)/bashbug${man1ext}
237        $(RM) $(DESTDIR)$(infodir)/bash.info
238        -if test -n "$(htmldir)" ; then \
239                $(RM) $(DESTDIR)$(htmldir)/bash.html ; \
240                $(RM) $(DESTDIR)$(htmldir)/bashref.html ; \
241        fi
242
243# for use by chet
244CREATED_FAQ = faq.news faq.news2 faq.mail faq.version
245
246faq:    ${CREATED_FAQ}
247
248faq.version:    FAQ.version FAQ
249        sh mkfaqvers FAQ.version > $@
250
251faq.headers.mail: FAQ.headers.mail FAQ
252        sh mkfaqvers FAQ.headers.mail > $@
253
254faq.headers.news: FAQ.headers.news FAQ
255        sh mkfaqvers FAQ.headers.news > $@
256
257faq.headers.news2: FAQ.headers.news2 FAQ
258        sh mkfaqvers FAQ.headers.news2 > $@
259
260faq.news: FAQ faq.headers.news faq.version
261        $(RM) $@
262        cat faq.headers.news faq.version FAQ > $@
263
264faq.news2: FAQ faq.headers.news2 faq.version
265        $(RM) $@
266        cat faq.headers.news2 faq.version FAQ > $@
267
268faq.mail: FAQ faq.headers.mail faq.version
269        $(RM) $@
270        cat faq.headers.mail faq.version FAQ > $@
271
272inst:   bashref.texi
273        $(SHELL) ./mkinstall
274        cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL
275        $(RM) INSTALL
276
277posix:  bashref.texi
278        $(SHELL) ./mkposix
279        cmp -s POSIX ../POSIX || mv POSIX ../POSIX
280        $(RM) POSIX
281
282rbash:  bashref.texi
283        $(SH) ./mkrbash
284        cmp -s RBASH ../RBASH || mv RBASH ../RBASH
285        $(RM) RBASH
286
287xdist: pdf inst posix rbash
Note: See TracBrowser for help on using the repository browser.