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