]> sjero.net Git - wget/blob - doc/Makefile.in
f98d8b60387b940f5f1fa1edde79e40689af77e8
[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 @COMMENT_IF_NO_POD2MAN@$(MAN)
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) $(srcdir)/wget.texi
65         -$(MAKEINFO)
66
67 $(TEXI2POD): $(srcdir)/$(TEXI2POD).in
68         sed s,/usr/bin/perl,@PERL@, $< > $@
69         chmod u+x $@
70
71 wget.pod: $(srcdir)/wget.texi texi2pod.pl
72         $(TEXI2POD) $< $@
73
74 $(MAN): wget.pod
75         $(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $< > $@
76
77 #wget.cat: $(MAN)
78 #       nroff -man $< > $@
79
80 dvi: wget.dvi
81
82 wget.dvi: $(srcdir)/wget.texi
83         $(TEXI2DVI) $(srcdir)/wget.texi
84
85 wget_us.ps: wget.dvi
86         $(DVIPS) -t letter -o $@ wget.dvi
87
88 wget_a4.ps: wget.dvi
89         $(DVIPS) -t a4 -o $@ wget.dvi
90
91 wget_toc.html: $(srcdir)/wget.texi
92         $(TEXI2HTML) $(srcdir)/wget.texi
93
94 #
95 # Dependencies for installing
96 #
97
98 # install all the documentation
99 install: install.info install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man
100
101 # uninstall all the documentation
102 uninstall: uninstall.info @COMMENT_IF_NO_POD2MAN@uninstall.man
103
104 # install info pages, creating install directory if necessary
105 install.info: wget.info
106         $(top_srcdir)/mkinstalldirs $(infodir)
107         -for file in wget.info wget.info-*[0-9]; do \
108            test -f $$file && $(INSTALL_DATA) $$file $(infodir)/$$file ; \
109         done
110
111 # install man page, creating install directory if necessary
112 install.man: $(MAN)
113         $(top_srcdir)/mkinstalldirs $(mandir)/man$(manext)
114         $(INSTALL_DATA) $(srcdir)/$(MAN) $(mandir)/man$(manext)/$(MAN)
115
116 # install sample.wgetrc
117 install.wgetrc: $(srcdir)/sample.wgetrc
118         $(top_srcdir)/mkinstalldirs $(sysconfdir)
119         @if test -f $(WGETRC); then \
120           if cmp -s $(srcdir)/sample.wgetrc $(WGETRC); then echo ""; \
121              else \
122              echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new'; \
123              $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new; \
124              echo; \
125              echo "WARNING: Differing \`$(WGETRC)'"; \
126              echo "         exists and has been spared.  You might want to"; \
127              echo "         consider merging in the new lines from"; \
128              echo "         \`$(WGETRC).new'."; \
129              echo; \
130              echo "<Hit RETURN to acknowledge>\c"; \
131              read user_input; \
132              echo; \
133           fi; \
134         else \
135           $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC); \
136         fi
137
138 # uninstall info pages
139 uninstall.info:
140         $(RM) $(infodir)/wget.info*
141
142 # uninstall man page
143 uninstall.man:
144         $(RM) $(mandir)/man$(manext)/$(MAN)
145
146 #
147 # Dependencies for cleanup
148 #
149
150 clean:
151         $(RM) *~ *.bak *.cat *.pod *.html
152         $(RM) *.dvi *.aux *.cp *.cps *.fn *.toc *.tp *.vr *.ps *.ky *.pg *.log
153
154 distclean: clean
155         $(RM) Makefile
156         $(RM) $(MAN) $(TEXI2POD)
157
158 realclean: distclean
159         $(RM) wget.info*
160         $(RM) $(SAMPLERCTEXI)
161
162 #
163 # Dependencies for maintenance
164 #
165
166 subdir = doc
167
168 Makefile: Makefile.in ../config.status
169         cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status