1 # Makefile for `wget' utility
2 # Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
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.
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.
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.
24 # Program to format Texinfo source into Info files.
26 # Program to format Texinfo source into DVI files.
28 # Program to convert DVI files to PostScript
30 # Program to convert texinfo files to html
31 TEXI2HTML = texi2html -expandinfo -split_chapter
35 top_srcdir = @top_srcdir@
43 sysconfdir = @sysconfdir@
46 INSTALL_DATA = @INSTALL_DATA@
49 TEXI2POD = ./texi2pod.pl
52 WGETRC = $(sysconfdir)/wgetrc
53 SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion
56 # Dependencies for building
59 all: wget.info @COMMENT_IF_NO_POD2MAN@$(MAN)
61 everything: all wget_us.ps wget_a4.ps wget_toc.html
63 $(SAMPLERCTEXI): $(srcdir)/sample.wgetrc
66 wget.info: $(SAMPLERCTEXI) $(srcdir)/wget.texi
69 $(TEXI2POD): $(srcdir)/$(TEXI2POD).in
70 sed s,/usr/bin/perl,@PERL@, $< > $@
73 wget.pod: $(srcdir)/wget.texi texi2pod.pl
77 $(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $< > $@
84 wget.dvi: $(srcdir)/wget.texi
85 $(TEXI2DVI) $(srcdir)/wget.texi
88 $(DVIPS) -t letter -o $@ wget.dvi
91 $(DVIPS) -t a4 -o $@ wget.dvi
93 wget_toc.html: $(srcdir)/wget.texi
94 $(TEXI2HTML) $(srcdir)/wget.texi
97 # Dependencies for installing
100 # install all the documentation
101 install: install.info install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man
103 # uninstall all the documentation
104 uninstall: uninstall.info @COMMENT_IF_NO_POD2MAN@uninstall.man
106 # install info pages, creating install directory if necessary
107 install.info: wget.info
108 $(top_srcdir)/mkinstalldirs $(infodir)
109 -for file in wget.info wget.info-*[0-9]; do \
110 test -f $$file && $(INSTALL_DATA) $$file $(infodir)/$$file ; \
113 # install man page, creating install directory if necessary
115 $(top_srcdir)/mkinstalldirs $(mandir)/man$(manext)
116 $(INSTALL_DATA) $(srcdir)/$(MAN) $(mandir)/man$(manext)/$(MAN)
118 # install sample.wgetrc
119 install.wgetrc: $(srcdir)/sample.wgetrc
120 $(top_srcdir)/mkinstalldirs $(sysconfdir)
121 @if test -f $(WGETRC); then \
122 if cmp -s $(srcdir)/sample.wgetrc $(WGETRC); then echo ""; \
124 echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new'; \
125 $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new; \
127 echo "WARNING: Differing \`$(WGETRC)'"; \
128 echo " exists and has been spared. You might want to"; \
129 echo " consider merging in the new lines from"; \
130 echo " \`$(WGETRC).new'."; \
132 echo "<Hit RETURN to acknowledge>\c"; \
137 $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC); \
140 # uninstall info pages
142 $(RM) $(infodir)/wget.info*
146 $(RM) $(mandir)/man$(manext)/$(MAN)
149 # Dependencies for cleanup
153 $(RM) *~ *.bak *.cat *.pod *.html
154 $(RM) *.dvi *.aux *.cp *.cps *.fn *.toc *.tp *.vr *.ps *.ky *.pg *.log
158 $(RM) $(MAN) $(TEXI2POD)
162 $(RM) $(SAMPLERCTEXI)
165 # Dependencies for maintenance
170 Makefile: Makefile.in ../config.status
171 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status