Imported from ../bash-2.01.tar.gz.
[platform/upstream/bash.git] / doc / Makefile.in
1 # This Makefile is for the Bash/documentation directory -*- text -*-.
2 #
3 RM          = rm -f
4
5 topdir = @top_srcdir@
6 srcdir = @srcdir@
7 VPATH = .:@srcdir@
8
9 infodir = @infodir@
10
11 mandir = @mandir@
12 manpfx = man
13
14 man1ext = 1
15 man1dir = $(mandir)/$(manpfx)$(man1ext)
16 man3ext = 3
17 man3dir = $(mandir)/$(manpfx)$(man3ext) 
18
19 INSTALL = @INSTALL@
20 INSTALL_DATA = @INSTALL_DATA@
21 BUILD_DIR = @BUILD_DIR@
22
23 # bad style
24 RL_LIBDIR = $(topdir)/lib/readline
25
26 # unused
27 TEXINDEX    = texindex
28 TEX         = tex
29
30 MAKEINFO    = makeinfo
31 TEXI2DVI    = ${topdir}/support/texi2dvi
32 TEXI2HTML   = ${topdir}/support/texi2html
33 QUIETPS     = #set this to -q to shut up dvips
34 DVIPS       = dvips -D 300 $(QUIETPS) -o $@     # tricky
35 TEXINPUTDIR = $(RL_LIBDIR)/doc
36
37 MKDIRS      = ${topdir}/support/mkdirs
38
39 # This should be a program that converts troff to an ascii-readable format
40 NROFF       = groff -Tascii
41
42 # This should be a program that converts troff to postscript
43 GROFF       = groff
44
45 HSUSER      = $(RL_LIBDIR)/doc/hsuser.texinfo
46 RLUSER      = $(RL_LIBDIR)/doc/rluser.texinfo
47
48 .SUFFIXES:      .0 .1 .3 .ms .ps .txt .dvi
49
50 .1.ps:
51         $(RM) $@
52         -${GROFF} -man $< > $@
53
54 .1.0:
55         $(RM) $@
56         -${NROFF} -man $< > $@
57
58 .ms.ps:
59         $(RM) $@
60         -${GROFF} -ms $< > $@
61
62 .ms.txt:
63         $(RM) $@
64         -${NROFF} -ms $< > $@
65
66 .3.ps:
67         $(RM) $@
68         -${GROFF} -man $< > $@
69
70 .3.0:
71         $(RM) $@
72         -${NROFF} -man $< > $@
73
74 all: ps info dvi text html
75 nodvi: ps info text html
76
77 ps: bash.ps bashbug.ps readline.ps article.ps builtins.ps
78 dvi: bashref.dvi bashref.ps 
79 info: bashref.info
80 text: bash.0 bashbug.0 builtins.0 readline.0
81 html: bashref.html
82
83 bashref.dvi: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
84         TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/bashref.texi
85
86 bashref.ps: bashref.dvi
87         $(RM) $@
88         $(DVIPS) bashref.dvi
89
90 bashref.info: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
91         $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
92
93 bashref.html: bashref.texi $(HSUSER) $(RLUSER)
94         $(TEXI2HTML) -I $(TEXINPUTDIR) $(srcdir)/bashref.texi
95
96 bash.dvi: bash.texinfo $(HSUSER) $(RLUSER)
97         TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) bash.texinfo
98
99 bashman.ps: bash.dvi
100         $(RM) $@
101         $(DVIPS) bash.dvi
102
103 bash.txt: bash.1
104 bash.ps: bash.1
105 bashbug.ps: bashbug.1
106 builtins.ps: builtins.1 bash.1
107 bash.0: bash.1
108 bashbug.0: bashbug.1
109 builtins.0: builtins.1 bash.1
110 readline.0: readline.3
111 readline.ps: readline.3
112 article.ps: article.ms
113
114 faq:    faq.news faq.news2 faq.mail faq.version
115
116 faq.version:    FAQ.version FAQ
117         sh mkfaqvers FAQ.version > $@
118
119 faq.news: FAQ FAQ.headers.news faq.version
120         $(RM) $@
121         cat FAQ.headers.news faq.version FAQ > $@
122
123 faq.news2: FAQ FAQ.headers.news2 faq.version
124         $(RM) $@
125         cat FAQ.headers.news2 faq.version FAQ > $@
126
127 faq.mail: FAQ FAQ.headers.mail faq.version
128         $(RM) $@
129         cat FAQ.headers.mail faq.version FAQ > $@
130
131 clean:
132         $(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \
133                 *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o \
134                 core rluser.texinfo hsuser.texinfo
135
136 distclean mostlyclean: clean
137         $(RM) Makefile
138
139 maintainer-clean:       clean
140         $(RM) *.0 *.ps *.dvi *.info *.txt
141         $(RM) Makefile
142
143 installdirs:
144         -test -d $(man1dir) || $(SHELL) ${MKDIRS} $(man1dir)
145         -test -d $(man3dir) || $(SHELL) ${MKDIRS} $(man3dir)
146         -test -d $(infodir) || $(SHELL) ${MKDIRS} $(infodir)
147         
148 install: info installdirs
149         -$(INSTALL_DATA) $(srcdir)/bash.1 $(man1dir)/bash.${man1ext}
150         -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(man1dir)/bashbug.${man1ext}
151 # uncomment the next line to install the readline man page
152 #       -$(INSTALL_DATA) $(srcdir)/readline.3 $(man3dir)/readline.${man3ext}
153 # uncomment the next line to install the builtins man page
154 #       $(INSTALL_DATA) builtins.1 $(man1dir)/bash_builtins.${man1ext}
155         -$(INSTALL_DATA) $(srcdir)/bashref.info $(infodir)/bash.info
156 # run install-info if it is present to update the info directory
157         if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
158                 install-info --dir-file=$(infodir)/dir $(infodir)/bash.info; \
159         else true; fi
160
161 uninstall:
162         -$(RM) $(man1dir)/bash.${man1ext} $(man1dir)/bashbug.${man1ext}
163         -$(RM) $(man3dir)/readline.${man3ext}
164         $(RM) $(infodir)/bash.info
165
166 # for use by chet
167 inst:   bashref.texi
168         $(SHELL) ./mkinstall
169         cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL
170         $(RM) INSTALL
171
172 posix:  bashref.texi
173         $(SHELL) ./mkposix
174         cmp -s POSIX.NOTES ../CWRU/POSIX.NOTES || mv POSIX.NOTES ../CWRU/POSIX.NOTES
175         $(RM) POSIX.NOTES