]> sjero.net Git - wget/blob - doc/Makefile.in
[svn] Merge of fix for bugs 20341 and 20410.
[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 3 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, see <http://www.gnu.org/licenses/>.
16
17 #
18 # Version: @VERSION@
19 #
20
21 SHELL = /bin/sh
22
23 # Program to format Texinfo source into Info files.
24 MAKEINFO = @MAKEINFO@
25 # Program to format Texinfo source into DVI files.
26 TEXI2DVI = texi2dvi
27 # Program to convert DVI files to PostScript
28 DVIPS = dvips -D 300
29 # Program to convert texinfo files to html
30 TEXI2HTML = texi2html -expandinfo -split_chapter
31
32 top_builddir = ..
33
34 top_srcdir = @top_srcdir@
35 srcdir     = @srcdir@
36 VPATH      = @srcdir@
37
38 prefix     = @prefix@
39 infodir    = @infodir@
40 mandir     = @mandir@
41 manext     = 1
42 sysconfdir = @sysconfdir@
43
44 DESTDIR    =
45
46 INSTALL      = @INSTALL@
47 INSTALL_DATA = @INSTALL_DATA@
48 RM = rm -f
49
50 TEXI2POD     = $(srcdir)/texi2pod.pl
51 POD2MAN      = @POD2MAN@
52 MAN          = wget.$(manext)
53 WGETRC       = $(sysconfdir)/wgetrc
54 SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion
55
56 #
57 # Dependencies for building
58 #
59
60 all: wget.info @COMMENT_IF_NO_POD2MAN@$(MAN)
61
62 everything: all wget_us.ps wget_a4.ps wget_toc.html
63
64 $(SAMPLERCTEXI): $(srcdir)/sample.wgetrc
65         sed s/@/@@/g $? > $@
66
67 wget.info: $(srcdir)/wget.texi $(SAMPLERCTEXI) $(srcdir)/version.texi
68         $(MAKEINFO) -I$(srcdir) $(srcdir)/wget.texi
69
70 wget.pod: $(srcdir)/wget.texi $(srcdir)/version.texi
71         $(TEXI2POD) $(srcdir)/wget.texi $@
72
73 $(MAN): wget.pod
74         $(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $? > $@
75
76 #wget.cat: $(MAN)
77 #       nroff -man $? > $@
78
79 dvi: wget.dvi
80
81 wget.dvi: $(srcdir)/wget.texi
82         $(TEXI2DVI) $(srcdir)/wget.texi
83
84 wget_us.ps: wget.dvi
85         $(DVIPS) -t letter -o $@ wget.dvi
86
87 wget_a4.ps: wget.dvi
88         $(DVIPS) -t a4 -o $@ wget.dvi
89
90 wget_toc.html: $(srcdir)/wget.texi
91         $(TEXI2HTML) $(srcdir)/wget.texi
92
93 #
94 # Dependencies for installing
95 #
96
97 # install all the documentation
98 install: install.info install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man
99
100 # uninstall all the documentation
101 uninstall: uninstall.info @COMMENT_IF_NO_POD2MAN@uninstall.man
102
103 # install info pages, creating install directory if necessary
104 # if the info pages are built in the build directory, they are used.
105 # otherwise, the ones from the distribution are installed.
106 install.info: wget.info
107         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir)
108         -if test -f wget.info; then \
109           for file in wget.info wget.info-*[0-9]; do \
110             if test -f "$$file"; then \
111               $(INSTALL_DATA) "$$file" "$(DESTDIR)$(infodir)/$$file" ; \
112             fi; \
113           done; \
114         else \
115           for file in $(srcdir)/wget.info $(srcdir)/wget.info-*[0-9]; do \
116             if test -f "$$file"; then \
117               $(INSTALL_DATA) "$$file" "$(DESTDIR)$(infodir)/`basename $$file`" ; \
118             fi; \
119           done; \
120         fi
121
122 # install man page, creating install directory if necessary
123 install.man: $(MAN)
124         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext)
125         $(INSTALL_DATA) $(MAN) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
126
127 # install sample.wgetrc
128 install.wgetrc: $(srcdir)/sample.wgetrc
129         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
130         @if test -f $(DESTDIR)$(WGETRC); then \
131           if cmp -s $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); then echo ""; \
132              else \
133              echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new'; \
134              $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new; \
135              echo; \
136              echo "WARNING: Differing \`$(DESTDIR)$(WGETRC)'"; \
137              echo "         exists and has been spared.  You might want to"; \
138              echo "         consider merging in the new lines from"; \
139              echo "         \`$(DESTDIR)$(WGETRC).new'."; \
140              echo; \
141           fi; \
142         else \
143           $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); \
144         fi
145
146 # uninstall info pages
147 uninstall.info:
148         $(RM) $(DESTDIR)$(infodir)/wget.info*
149
150 # uninstall man page
151 uninstall.man:
152         $(RM) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
153
154 #
155 # Dependencies for cleanup
156 #
157
158 clean:
159         $(RM) *~ *.bak *.cat *.pod *.html
160         $(RM) *.dvi *.aux *.cp *.cps *.fn *.toc *.tp *.vr *.ps *.ky *.pg *.log
161
162 distclean: clean
163         $(RM) Makefile
164         $(RM) $(MAN)
165
166 realclean: distclean
167         $(RM) wget.info*
168         $(RM) $(SAMPLERCTEXI)
169
170 #
171 # Dependencies for maintenance
172 #
173
174 subdir = doc
175
176 Makefile: Makefile.in ../config.status
177         cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status