2996
|
1 # This makefile for Readline library documentation is in -*- text -*- mode. |
|
2 # Emacs likes it that way. |
|
3 top_srcdir = @top_srcdir@ |
|
4 srcdir = @srcdir@ |
|
5 |
|
6 prefix = @prefix@ |
|
7 infodir = @infodir@ |
|
8 |
|
9 mandir = @mandir@ |
|
10 man3dir = $(mandir)/man3 |
|
11 |
|
12 RM = rm -f |
|
13 |
|
14 TEXINPUTDIR = $(srcdir) |
|
15 |
|
16 MAKEINFO = makeinfo |
|
17 TEXI2DVI = $(srcdir)/texi2dvi |
|
18 TEXI2HTML = $(srcdir)/texi2html |
|
19 QUIETPS = #set this to -q to shut up dvips |
|
20 DVIPS = dvips -D 300 $(QUIETPS) -o $@ # tricky |
|
21 |
|
22 INSTALL = @INSTALL@ |
|
23 INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
|
24 INSTALL_DATA = @INSTALL_DATA@ |
|
25 |
|
26 RLSRC = $(srcdir)/rlman.texinfo $(srcdir)/rluser.texinfo \ |
|
27 $(srcdir)/rltech.texinfo |
|
28 HISTSRC = $(srcdir)/hist.texinfo $(srcdir)/hsuser.texinfo \ |
|
29 $(srcdir)/hstech.texinfo |
|
30 |
|
31 # This should be a program that converts troff to an ascii-readable format |
|
32 NROFF = groff -Tascii |
|
33 |
|
34 # This should be a program that converts troff to postscript |
|
35 GROFF = groff |
|
36 |
|
37 DVIOBJ = readline.dvi history.dvi |
|
38 INFOOBJ = readline.info history.info |
|
39 PSOBJ = readline.ps history.ps |
|
40 HTMLOBJ = readline.html history.html |
|
41 TEXTOBJ = readline.0 |
|
42 |
|
43 CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ) $(TEXTOBJ) |
|
44 |
|
45 .SUFFIXES: .0 .3 .ps .txt .dvi |
|
46 |
|
47 .3.0: |
|
48 $(RM) $@ |
|
49 -${NROFF} -man $< > $@ |
|
50 |
|
51 all: info dvi html ps text |
|
52 nodvi: info html text |
|
53 |
|
54 readline.dvi: $(RLSRC) |
|
55 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texinfo |
|
56 mv rlman.dvi readline.dvi |
|
57 |
|
58 readline.info: $(RLSRC) |
|
59 $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texinfo |
|
60 |
|
61 history.dvi: ${HISTSRC} |
|
62 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/hist.texinfo |
|
63 mv hist.dvi history.dvi |
|
64 |
|
65 history.info: ${HISTSRC} |
|
66 $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/hist.texinfo |
|
67 |
|
68 readline.ps: readline.dvi |
|
69 $(RM) $@ |
|
70 $(DVIPS) readline.dvi |
|
71 |
|
72 history.ps: history.dvi |
|
73 $(RM) $@ |
|
74 $(DVIPS) history.dvi |
|
75 |
|
76 readline.html: ${RLSRC} |
|
77 $(TEXI2HTML) -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo |
|
78 sed -e 's:rlman.html:readline.html:' -e 's:rlman_toc.html:readline_toc.html:' rlman.html > readline.html |
|
79 sed -e 's:rlman.html:readline.html:' -e 's:rlman_toc.html:readline_toc.html:' rlman_toc.html > readline_toc.html |
|
80 $(RM) rlman.html rlman_toc.html |
|
81 |
|
82 history.html: ${HISTSRC} |
|
83 $(TEXI2HTML) -I $(TEXINPUTDIR) $(srcdir)/hist.texinfo |
|
84 sed -e 's:hist.html:history.html:' -e 's:hist_toc.html:history_toc.html:' hist.html > history.html |
|
85 sed -e 's:hist.html:history.html:' -e 's:hist_toc.html:history_toc.html:' hist_toc.html > history_toc.html |
|
86 $(RM) hist.html hist_toc.html |
|
87 |
|
88 info: $(INFOOBJ) |
|
89 dvi: $(DVIOBJ) |
|
90 ps: $(PSOBJ) |
|
91 html: $(HTMLOBJ) |
|
92 text: $(TEXTOBJ) |
|
93 |
|
94 readline.0: $(srcdir)/readline.3 |
|
95 |
|
96 clean: |
|
97 $(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \ |
|
98 *.fns *.kys *.tps *.vrs *.o core |
|
99 |
|
100 distclean: clean |
|
101 $(RM) $(CREATED_DOCS) |
|
102 |
|
103 mostlyclean: clean |
|
104 |
|
105 maintainer-clean: clean |
|
106 $(RM) $(CREATED_DOCS) |
|
107 |
|
108 installdirs: $(top_srcdir)/support/mkdirs |
|
109 -$(SHELL) $(top_srcdir)/support/mkdirs $(infodir) $(man3dir) |
|
110 |
|
111 install: installdirs info |
|
112 ${INSTALL_DATA} readline.info $(infodir)/readline.info |
|
113 ${INSTALL_DATA} history.info $(infodir)/history.info |
|
114 if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ |
|
115 install-info --dir-file=$(infodir)/dir $(infodir)/readline.info ; \ |
|
116 install-info --dir-file=$(infodir)/dir $(infodir)/history.info ; \ |
|
117 else true; fi |
|
118 -${INSTALL_DATA} $(srcdir)/readline.3 $(man3dir)/readline.3 |
|
119 |
|
120 uninstall: |
|
121 $(RM) $(infodir)/readline.info |
|
122 $(RM) $(infodir)/history.info |
|
123 $(RM) $(man3dir)/readline.3 |