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