]> sjero.net Git - wget/blob - doc/Makefile.in
[svn] Applied doc fixes from Jan's "realclean patch". The doc fixes
[wget] / doc / Makefile.in
1 # Makefile for `wget' utility
2 # Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
3
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 #
19 # Version: @VERSION@
20 #
21
22 SHELL = /bin/sh
23
24 # Program to format Texinfo source into Info files.
25 MAKEINFO = @MAKEINFO@
26 # Program to format Texinfo source into DVI files.
27 TEXI2DVI = texi2dvi
28 # Program to convert DVI files to PostScript
29 DVIPS = dvips -D 300
30 # Program to convert texinfo files to html
31 TEXI2HTML = texi2html -expandinfo -split_chapter
32
33 top_srcdir = @top_srcdir@
34 srcdir     = @srcdir@
35 VPATH      = @srcdir@
36
37 prefix     = @prefix@
38 infodir    = @infodir@
39 mandir     = @mandir@
40 manext     = 1
41 sysconfdir = @sysconfdir@
42
43 INSTALL      = @INSTALL@
44 INSTALL_DATA = @INSTALL_DATA@
45 RM = rm -f
46
47 TEXI2POD     = ./texi2pod.pl
48 POD2MAN      = pod2man
49 MAN          = wget.$(manext)
50 WGETRC       = $(sysconfdir)/wgetrc
51 SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion
52
53 #
54 # Dependencies for building
55 #
56
57 all: wget.info
58
59 everything: all wget_us.ps wget_a4.ps wget_toc.html
60
61 $(SAMPLERCTEXI): $(srcdir)/sample.wgetrc
62         sed s/@/@@/g $< > $@
63
64 wget.info: $(SAMPLERCTEXI) wget.texi
65         -$(MAKEINFO)
66
67 wget.pod: wget.texi
68         $(TEXI2POD) $< > $@
69
70 $(MAN): wget.pod
71         $(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $< > $@
72
73 man: $(MAN)
74
75 #wget.cat: $(MAN)
76 #       nroff -man $< > $@
77
78 dvi: wget.dvi
79
80 wget.dvi: wget.texi
81         $(TEXI2DVI) $(srcdir)/wget.texi
82
83 wget_us.ps: wget.dvi
84         $(DVIPS) -t letter -o $@ wget.dvi
85
86 wget_a4.ps: wget.dvi
87         $(DVIPS) -t a4 -o $@ wget.dvi
88
89 wget_toc.html: wget.texi
90         $(TEXI2HTML) $(srcdir)/wget.texi
91
92 #
93 # Dependencies for installing
94 #
95
96 # install all the documentation
97 install: install.info install.wgetrc # install.man
98
99 # uninstall all the documentation
100 uninstall: uninstall.info # uninstall.man
101
102 # install info pages, creating install directory if necessary
103 install.info: wget.info
104         $(top_srcdir)/mkinstalldirs $(infodir)
105         -for file in wget.info wget.info-*[0-9]; do \
106            test -f $$file && $(INSTALL_DATA) $$file $(infodir)/$$file ; \
107         done
108
109 # install man page, creating install directory if necessary
110 install.man:
111         $(top_srcdir)/mkinstalldirs $(mandir)/man$(manext)
112         $(INSTALL_DATA) $(srcdir)/$(MAN) $(mandir)/man$(manext)/$(MAN)
113
114 # install sample.wgetrc
115 install.wgetrc:
116         $(top_srcdir)/mkinstalldirs $(sysconfdir)
117         @if test -f $(WGETRC); then \
118           if cmp -s $(srcdir)/sample.wgetrc $(WGETRC); then echo ""; \
119              else \
120              echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new'; \
121              $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new; \
122              echo; \
123              echo "WARNING: Differing \`$(WGETRC)'"; \
124              echo "         exists and has been spared.  You might want to"; \
125              echo "         consider merging in the new lines from"; \
126              echo "         \`$(WGETRC).new'."; \
127              echo; \
128              echo "<Hit RETURN to acknowledge>\c"; \
129              read user_input; \
130              echo; \
131           fi; \
132         else \
133           $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC); \
134         fi
135
136 # uninstall info pages
137 uninstall.info:
138         $(RM) $(infodir)/wget.info*
139
140 # uninstall man page
141 uninstall.man:
142         $(RM) $(mandir)/man$(manext)/$(MAN)
143
144 #
145 # Dependencies for cleanup
146 #
147
148 clean:
149         $(RM) *~ *.bak *.cat *.pod *.html
150         $(RM) *.dvi *.aux *.cp *.cps *.fn *.toc *.tp *.vr *.ps *.ky *.pg *.log
151
152 distclean: clean
153         $(RM) Makefile
154         $(RM) $(MAN)
155
156 realclean: distclean
157         $(RM) wget.info*
158         $(RM) $(SAMPLERCTEXI)
159
160 #
161 # Dependencies for maintenance
162 #
163
164 subdir = doc
165
166 Makefile: Makefile.in ../config.status
167         cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status