summaryrefslogtreecommitdiff
path: root/readline/doc/Makefile.in
blob: 2eabb410833ffc6b4a86a2f020c2ba09f4db6019 (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
# This makefile for Readline library documentation is in -*- text -*- mode.
# Emacs likes it that way.
top_srcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = .:@srcdir@

prefix = @prefix@
infodir = @infodir@

mandir = @mandir@
man3dir = $(mandir)/man3

RM = rm -f

TEXINPUTDIR = $(srcdir)

MAKEINFO    = makeinfo
TEXI2DVI    = $(srcdir)/texi2dvi
TEXI2HTML   = $(srcdir)/texi2html
QUIETPS     = #set this to -q to shut up dvips
DVIPS       = dvips -D 300 $(QUIETPS) -o $@     # tricky

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

RLSRC = $(srcdir)/rlman.texinfo $(srcdir)/rluser.texinfo \
	$(srcdir)/rltech.texinfo
HISTSRC = $(srcdir)/hist.texinfo $(srcdir)/hsuser.texinfo \
	  $(srcdir)/hstech.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
INFOOBJ = readline.info history.info
PSOBJ = readline.ps history.ps
HTMLOBJ = readline.html history.html
HTMLTOC = readline_toc.html history_toc.html
TEXTOBJ = readline.0

CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ) $(HTMLTOC) $(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

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

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

readline.html:	${RLSRC}
	$(TEXI2HTML) -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo
	sed -e 's:rlman.html:readline.html:' -e 's:rlman_toc.html:readline_toc.html:' rlman.html > readline.html
	sed -e 's:rlman.html:readline.html:' -e 's:rlman_toc.html:readline_toc.html:' rlman_toc.html > readline_toc.html
	$(RM) rlman.html rlman_toc.html

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

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

readline.0: readline.3

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

distclean: clean
	$(RM) $(CREATED_DOCS)
	$(RM) Makefile

mostlyclean: clean

maintainer-clean: clean
	$(RM) $(CREATED_DOCS)
	$(RM) Makefile

installdirs:	$(top_srcdir)/support/mkdirs
	-$(SHELL) $(top_srcdir)/support/mkdirs $(infodir) $(man3dir)

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

uninstall:
	$(RM) $(infodir)/readline.info
	$(RM) $(infodir)/history.info
	$(RM) $(man3dir)/readline.3