aboutsummaryrefslogtreecommitdiff
path: root/readline/doc/Makefile.in
blob: 8a85ae17c8b9853f4b4ba588307e2751c84664ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# This makefile for Readline library documentation is in -*- text -*- mode.
# Emacs likes it that way.

# Copyright (C) 1996 Free Software Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.

topdir = @top_srcdir@
srcdir = @srcdir@
VPATH = .:@srcdir@

prefix = @prefix@
infodir = @infodir@

mandir = @mandir@
manpfx = man

man1ext = .1
man1dir = $(mandir)/$(manpfx)1
man3ext = .3
man3dir = $(mandir)/$(manpfx)3

# set this to a value to have the HTML documentation installed
htmldir =

# Support an alternate destination root directory for package building
DESTDIR =

SHELL = @MAKE_SHELL@
RM = rm -f

INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@

BUILD_DIR = @BUILD_DIR@
TEXINPUTDIR = $(srcdir)

MAKEINFO    = LANGUAGE= makeinfo
TEXI2DVI    = $(srcdir)/texi2dvi
TEXI2HTML   = $(srcdir)/texi2html
QUIETPS     = #set this to -q to shut up dvips
PAPERSIZE   = letter
PSDPI       = 300	# I don't have any 600-dpi printers
DVIPS       = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@     # tricky

RLSRC = $(srcdir)/rlman.texinfo $(srcdir)/rluser.texinfo \
	$(srcdir)/rltech.texinfo $(srcdir)/manvers.texinfo \
	$(srcdir)/rluserman.texinfo
HISTSRC = $(srcdir)/hist.texinfo $(srcdir)/hsuser.texinfo \
	  $(srcdir)/hstech.texinfo $(srcdir)/manvers.texinfo

# This should be a program that converts troff to an ascii-readable format
NROFF       = groff -Tascii

# This should be a program that converts troff to postscript
GROFF       = groff

DVIOBJ = readline.dvi history.dvi rluserman.dvi
INFOOBJ = readline.info history.info rluserman.info
PSOBJ = readline.ps history.ps rluserman.ps readline_3.ps history_3.ps
HTMLOBJ = readline.html history.html rluserman.html
TEXTOBJ = readline.0 history.0

INTERMEDIATE_OBJ = rlman.dvi hist.dvi rluserman.dvi

DIST_DOCS = $(DVIOBJ) $(PSOBJ) $(HTMLOBJ) $(INFOOBJ) $(TEXTOBJ)

.SUFFIXES:      .0 .3 .ps .txt .dvi

.3.0:
	$(RM) $@
	-${NROFF} -man $< > $@

all: info dvi html ps text
nodvi: info html text

readline.dvi: $(RLSRC)
	TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texinfo
	mv rlman.dvi readline.dvi

readline.info: $(RLSRC)
	$(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texinfo

rluserman.dvi: $(RLSRC)
	TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texinfo

rluserman.info: $(RLSRC)
	$(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texinfo

history.dvi: ${HISTSRC}
	TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/hist.texinfo
	mv hist.dvi history.dvi

history.info: ${HISTSRC}
	$(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/hist.texinfo

readline.ps:	readline.dvi
	$(RM) $@
	$(DVIPS) readline.dvi

rluserman.ps:	rluserman.dvi
	$(RM) $@
	$(DVIPS) rluserman.dvi

history.ps:	history.dvi
	$(RM) $@
	$(DVIPS) history.dvi

#
# This leaves readline.html and rlman.html -- rlman.html is for www.gnu.org
#
readline.html:	${RLSRC}
	$(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo
	sed -e 's:rlman.html:readline.html:g' rlman.html > readline.html

rluserman.html:	${RLSRC}
	$(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texinfo

history.html:	${HISTSRC}
	$(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/hist.texinfo
	sed -e 's:hist.html:history.html:g' hist.html > history.html
	$(RM) hist.html

info:	$(INFOOBJ)
dvi:	$(DVIOBJ)
ps:	$(PSOBJ)
html:	$(HTMLOBJ)
text:	$(TEXTOBJ)

readline.0: readline.3

readline_3.ps: readline.3
	${RM} $@
	${GROFF} -man < $(srcdir)/readline.3 > $@ 

history.0: history.3

history_3.ps: history.3
	${RM} $@
	${GROFF} -man < $(srcdir)/history.3 > $@ 

clean:
	$(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \
	      *.fns *.kys *.tps *.vrs *.bt *.bts *.o core *.core

mostlyclean: clean

distclean: clean maybe-clean
	$(RM) $(INTERMEDIATE_OBJ)
	$(RM) Makefile

maybe-clean:
	-if test "X$(topdir)" != "X$(BUILD_DIR)"; then \
		$(RM) $(DIST_DOCS); \
	fi

maintainer-clean: clean
	$(RM) $(DIST_DOCS)
	$(RM) $(INTERMEDIATE_OBJ)
	$(RM) Makefile

installdirs:	$(topdir)/support/mkdirs
	-$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir)
	-if test -n "${htmldir}" ; then \
		$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(htmldir) ; \
	fi

install:	installdirs
	if test -f readline.info; then \
		${INSTALL_DATA} readline.info $(DESTDIR)$(infodir)/readline.info; \
	else \
		${INSTALL_DATA} $(srcdir)/readline.info $(DESTDIR)$(infodir)/readline.info; \
	fi
	if test -f rluserman.info; then \
		${INSTALL_DATA} rluserman.info $(DESTDIR)$(infodir)/rluserman.info; \
	else \
		${INSTALL_DATA} $(srcdir)/rluserman.info $(DESTDIR)$(infodir)/rluserman.info; \
	fi
	if test -f history.info; then \
		${INSTALL_DATA} history.info $(DESTDIR)$(infodir)/history.info; \
	else \
		${INSTALL_DATA} $(srcdir)/history.info $(DESTDIR)$(infodir)/history.info; \
	fi
	-if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
		install-info --dir-file=$(DESTDIR)$(infodir)/dir \
			$(DESTDIR)$(infodir)/readline.info ; \
		install-info --dir-file=$(DESTDIR)$(infodir)/dir \
			$(DESTDIR)$(infodir)/history.info ; \
		install-info --dir-file=$(DESTDIR)$(infodir)/dir \
			$(DESTDIR)$(infodir)/rluserman.info ; \
	else true; fi
	-${INSTALL_DATA} $(srcdir)/readline.3 $(DESTDIR)$(man3dir)/readline$(man3ext)
	-${INSTALL_DATA} $(srcdir)/history.3 $(DESTDIR)$(man3dir)/history$(man3ext)
	-if test -n "${htmldir}" ; then \
		if test -f readline.html; then \
			${INSTALL_DATA} readline.html $(DESTDIR)$(htmldir)/readline.html; \
		else \
			${INSTALL_DATA} $(srcdir)/readline.html $(DESTDIR)$(htmldir)/readline.html; \
		fi ; \
		if test -f history.html; then \
			${INSTALL_DATA} history.html $(DESTDIR)$(htmldir)/history.html; \
		else \
			${INSTALL_DATA} $(srcdir)/history.html $(DESTDIR)$(htmldir)/history.html; \
		fi ; \
		if test -f rluserman.html; then \
			${INSTALL_DATA} rluserman.html $(DESTDIR)$(htmldir)/rluserman.html; \
		else \
			${INSTALL_DATA} $(srcdir)/rluserman.html $(DESTDIR)$(htmldir)/rluserman.html; \
		fi ; \
	fi

uninstall:
	$(RM) $(DESTDIR)$(infodir)/readline.info
	$(RM) $(DESTDIR)$(infodir)/rluserman.info
	$(RM) $(DESTDIR)$(infodir)/history.info
	$(RM) $(DESTDIR)$(man3dir)/readline$(man3ext)
	$(RM) $(DESTDIR)$(man3dir)/history$(man3ext)
	-if test -n "${htmldir}" ; then \
		$(RM) $(DESTDIR)$(htmldir)/readline.html ; \
		$(RM) $(DESTDIR)$(htmldir)/rluserman.html ; \
		$(RM) $(DESTDIR)$(htmldir)/history.html ; \
	fi