improve of cmpl.
[bush.git] / doc / umdoc / Makefile.in
blob10739c6e463977958e21333934949fd625af3f04
1 # This Makefile is for the Bush/documentation directory -*- text -*-.
3 # Copyright (C) 2003-2015 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@
26 PACKAGE_TARNAME = @PACKAGE_TARNAME@
29 SHELL = @MAKE_SHELL@
30 RM = rm -f
32 topdir = @top_srcdir@
33 srcdir = @srcdir@
34 VPATH = @srcdir@
36 prefix = @prefix@
37 exec_prefix = @exec_prefix@
39 datarootdir = @datarootdir@
41 infodir = @infodir@
43 docdir = @docdir@
45 # set this to a directory name to have the HTML files installed
46 htmldir = @htmldir@
48 # Support an alternate destination root directory for package building
49 DESTDIR =
51 mandir = @mandir@
52 manpfx = man
54 man1ext = .1
55 man1dir = $(mandir)/$(manpfx)1
56 man3ext = .3
57 man3dir = $(mandir)/$(manpfx)3
59 INSTALL = @INSTALL@
60 INSTALL_DATA = @INSTALL_DATA@
61 BUILD_DIR = @BUILD_DIR@
63 SUPPORT_SRCDIR = $(topdir)/support
65 # bad style
66 RL_LIBDIR = $(topdir)/lib/readline
68 # unused
69 TEXINDEX = texindex
70 TEX = tex
72 MAKEINFO = makeinfo
73 TEXI2DVI = ${SUPPORT_SRCDIR}/texi2dvi
74 TEXI2HTML = ${SUPPORT_SRCDIR}/texi2html
75 MAN2HTML = ${BUILD_DIR}/support/man2html
76 HTMLPOST = ${srcdir}/htmlpost.sh
77 INFOPOST = ${srcdir}/infopost.sh
78 QUIETPS = #set this to -q to shut up dvips
79 PAPERSIZE = letter # change to a4 for A4-size paper
80 PSDPI = 600 # could be 300 if you like
81 DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky
82 # experimental; uses external texi2dvi for now; this needs pdftex to be present
83 TEXI2PDF = texi2dvi --pdf
85 TEXINPUTDIR = $(RL_LIBDIR)/doc
86 SET_TEXINPUTS = TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS
88 # These tools might not be available; they're not required
89 DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE}
90 PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@
92 MKDIRS = ${SUPPORT_SRCDIR}/mkdirs
94 # This should be a program that converts troff to an ascii-readable format
95 # added the -P -c for benefit of Mac OS X, which insists on adding colors if
96 # it's not present
97 NROFF = groff -Tascii -P -c
99 # This should be a program that converts troff to postscript
100 GROFF = groff
102 HSUSER = $(RL_LIBDIR)/doc/hsuser.texi
103 RLUSER = $(RL_LIBDIR)/doc/rluser.texi
105 BUSHREF_FILES = $(srcdir)/bushref.texi $(srcdir)/fdl.texi $(srcdir)/version.texi
107 .SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html .pdf
109 .1.ps:
110 $(RM) $@
111 -${GROFF} -man $< > $@
113 .1.0:
114 $(RM) $@
115 -${NROFF} -man $< > $@
117 .1.html:
118 $(RM) $@
119 -${MAN2HTML} $< | ${HTMLPOST} > $@
121 .ms.ps:
122 $(RM) $@
123 -${GROFF} -ms $< > $@
125 .ms.txt:
126 $(RM) $@
127 -${NROFF} -ms $< > $@
129 .3.ps:
130 $(RM) $@
131 -${GROFF} -man $< > $@
133 .3.0:
134 $(RM) $@
135 -${NROFF} -man $< > $@
137 .3.html:
138 $(RM) $@
139 -${MAN2HTML} $< > $@
141 .ps.pdf:
142 $(RM) $@
143 -${PSPDF} $<
145 .dvi.pdf:
146 $(RM) $@
147 -${DVIPDF} $<
149 .dvi.ps:
150 ${RM} $@
151 -${DVIPS} $<
153 #.texi.pdf:
154 # $(RM) $@
155 # -${TEXI2PDF} $<
157 all: ps info dvi text html $(MAN2HTML)
158 nodvi: ps info text html
159 everything: all pdf
161 PSFILES = bush.ps bushbug.ps article.ps builtins.ps rbush.ps
162 DVIFILES = bushref.dvi bushref.ps
163 INFOFILES = bushref.info bush.info
164 MAN0FILES = bush.0 bushbug.0 builtins.0 rbush.0
165 HTMLFILES = bushref.html bush.html
166 PDFFILES = bush.pdf bushref.pdf article.pdf rose94.pdf
168 ps: ${PSFILES}
169 dvi: ${DVIFILES}
170 info: ${INFOFILES}
171 text: ${MAN0FILES}
172 html: ${HTMLFILES}
173 pdf: ${PDFFILES}
175 bushref.dvi: $(BUSHREF_FILES) $(HSUSER) $(RLUSER)
176 ${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bushref.texi || { ${RM} $@ ; exit 1; }
178 bushref.info: $(BUSHREF_FILES) $(HSUSER) $(RLUSER)
179 $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bushref.texi
181 # experimental
182 bushref.pdf: $(BUSHREF_FILES) $(HSUSER) $(RLUSER)
183 ${SET_TEXINPUTS} $(TEXI2PDF) $(srcdir)/bushref.texi || { ${RM} $@ ; exit 1; }
186 # can also use:
187 # $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bushref.texi
188 bushref.html: $(BUSHREF_FILES) $(HSUSER) $(RLUSER)
189 $(MAKEINFO) --html --no-split -I$(TEXINPUTDIR) $(srcdir)/bushref.texi
191 bush.info: bushref.info
192 ${SHELL} ${INFOPOST} < $(srcdir)/bushref.info > $@ ; \
194 bush.txt: bush.1
195 bush.ps: bush.1
196 bush.html: bush.1
197 bushbug.ps: bushbug.1
198 builtins.ps: builtins.1 bush.1
199 rbush.ps: rbush.1 bush.1
200 bush.0: bush.1
201 bushbug.0: bushbug.1
202 builtins.0: builtins.1 bush.1
203 rbush.0: rbush.1 bush.1
204 article.ps: article.ms
206 bushref.ps: bushref.dvi
208 article.pdf: article.ps
209 #bushref.pdf: bushref.dvi
210 # experimental
211 bushref.pdf: bushref.texi
212 bush.pdf: bush.ps
213 rose94.pdf: rose94.ps
215 OTHER_DOCS = $(srcdir)/FAQ $(srcdir)/INTRO
216 OTHER_INSTALLED_DOCS = FAQ INTRO
218 $(MAN2HTML): ${topdir}/support/man2html.c
219 -( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html)
221 clean:
222 $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \
223 *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o
224 ${RM} core *.core
226 mostlyclean: clean
227 $(RM) Makefile
229 distclean: clean maybe-clean
230 $(RM) Makefile
232 maintainer-clean: clean
233 ${RM} ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}
234 ${RM} ${CREATED_FAQ}
235 $(RM) Makefile
237 maybe-clean:
238 -if test "X$(topdir)" != "X$(BUILD_DIR)"; then \
239 $(RM) ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}; \
242 installdirs:
243 -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(man1dir)
244 -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(infodir)
245 -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(docdir)
246 -if test -n "$(htmldir)" ; then \
247 $(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(htmldir) ; \
250 install: info installdirs
251 -$(INSTALL_DATA) $(srcdir)/bush.1 $(DESTDIR)$(man1dir)/bush${man1ext}
252 -$(INSTALL_DATA) $(srcdir)/bushbug.1 $(DESTDIR)$(man1dir)/bushbug${man1ext}
253 -$(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir)
254 # uncomment the next lines to install the builtins man page
255 # sed 's:bush\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
256 # -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bush_builtins${man1ext}
257 # -$(RM) $${TMPDIR:-/var/tmp}/builtins.1
258 -if test -f bush.info; then d=.; else d=$(srcdir); fi; \
259 $(INSTALL_DATA) $$d/bush.info $(DESTDIR)$(infodir)/bush.info
260 # run install-info if it is present to update the info directory
261 if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
262 install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bush.info; \
263 else true; fi
264 # if htmldir is set, install the html files into that directory
265 -if test -n "${htmldir}" ; then \
266 $(INSTALL_DATA) $(srcdir)/bush.html $(DESTDIR)$(htmldir) ; \
267 $(INSTALL_DATA) $(srcdir)/bushref.html $(DESTDIR)$(htmldir) ; \
270 install_builtins: installdirs
271 sed 's:bush\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
272 -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bush_builtins${man1ext}
273 -$(RM) $${TMPDIR:-/var/tmp}/builtins.1
275 install_everything: install install_builtins
277 install-html: html
278 -if test -n "${htmldir}" ; then \
279 $(INSTALL_DATA) $(srcdir)/bush.html $(DESTDIR)$(htmldir) ; \
280 $(INSTALL_DATA) $(srcdir)/bushref.html $(DESTDIR)$(htmldir) ; \
283 uninstall:
284 -$(RM) $(DESTDIR)$(man1dir)/bush${man1ext} $(DESTDIR)$(man1dir)/bushbug${man1ext}
285 -$(RM) $(DESTDIR)$(man1dir)/bush_builtins${man1ext}
286 $(RM) $(DESTDIR)$(infodir)/bush.info
287 # run install-info if it is present to update the info directory
288 if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
289 install-info --delete --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bush.info; \
290 else true; fi
291 -( cd $(DESTDIR)$(docdir) && $(RM) $(OTHER_INSTALLED_DOCS) )
292 -if test -n "$(htmldir)" ; then \
293 $(RM) $(DESTDIR)$(htmldir)/bush.html ; \
294 $(RM) $(DESTDIR)$(htmldir)/bushref.html ; \
297 # for use by chet
298 CREATED_FAQ = faq.news faq.news2 faq.mail faq.version
300 faq: ${CREATED_FAQ}
302 faq.version: FAQ.version FAQ
303 sh mkfaqvers FAQ.version > $@
305 faq.headers.mail: FAQ.headers.mail FAQ
306 sh mkfaqvers FAQ.headers.mail > $@
308 faq.headers.news: FAQ.headers.news FAQ
309 sh mkfaqvers FAQ.headers.news > $@
311 faq.headers.news2: FAQ.headers.news2 FAQ
312 sh mkfaqvers FAQ.headers.news2 > $@
314 faq.news: FAQ faq.headers.news faq.version
315 $(RM) $@
316 cat faq.headers.news faq.version FAQ > $@
318 faq.news2: FAQ faq.headers.news2 faq.version
319 $(RM) $@
320 cat faq.headers.news2 faq.version FAQ > $@
322 faq.mail: FAQ faq.headers.mail faq.version
323 $(RM) $@
324 cat faq.headers.mail faq.version FAQ > $@
326 inst: bushref.texi
327 $(SHELL) ./mkinstall
328 cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL
329 $(RM) INSTALL
331 posix: bushref.texi
332 $(SHELL) ./mkposix
333 cmp -s POSIX ../POSIX || mv POSIX ../POSIX
334 $(RM) POSIX
336 rbush: bushref.texi
337 $(SHELL) ./mkrbush
338 cmp -s RBUSH ../RBUSH || mv RBUSH ../RBUSH
339 $(RM) RBUSH
341 xdist: everything inst posix rbush