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
33 top_srcdir = @top_srcdir@
41 sysconfdir = @sysconfdir@
44 INSTALL_DATA = @INSTALL_DATA@
47 TEXI2POD = ./texi2pod.pl
50 WGETRC = $(sysconfdir)/wgetrc
51 SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion
54 # Dependencies for building
57 all: wget.info @COMMENT_IF_NO_POD2MAN@$(MAN)
59 everything: all wget_us.ps wget_a4.ps wget_toc.html
61 $(SAMPLERCTEXI): $(srcdir)/sample.wgetrc
64 wget.info: $(SAMPLERCTEXI) $(srcdir)/wget.texi
67 $(TEXI2POD): $(srcdir)/$(TEXI2POD).in
68 sed s,/usr/bin/perl,@PERL@, $< > $@
71 wget.pod: $(srcdir)/wget.texi texi2pod.pl
75 $(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $< > $@
82 wget.dvi: $(srcdir)/wget.texi
83 $(TEXI2DVI) $(srcdir)/wget.texi
86 $(DVIPS) -t letter -o $@ wget.dvi
89 $(DVIPS) -t a4 -o $@ wget.dvi
91 wget_toc.html: $(srcdir)/wget.texi
92 $(TEXI2HTML) $(srcdir)/wget.texi
95 # Dependencies for installing
98 # install all the documentation
99 install: install.info install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man
101 # uninstall all the documentation
102 uninstall: uninstall.info @COMMENT_IF_NO_POD2MAN@uninstall.man
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 ; \
111 # install man page, creating install directory if necessary
113 $(top_srcdir)/mkinstalldirs $(mandir)/man$(manext)
114 $(INSTALL_DATA) $(srcdir)/$(MAN) $(mandir)/man$(manext)/$(MAN)
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 ""; \
122 echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new'; \
123 $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new; \
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'."; \
130 echo "<Hit RETURN to acknowledge>\c"; \
135 $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC); \
138 # uninstall info pages
140 $(RM) $(infodir)/wget.info*
144 $(RM) $(mandir)/man$(manext)/$(MAN)
147 # Dependencies for cleanup
151 $(RM) *~ *.bak *.cat *.pod *.html
152 $(RM) *.dvi *.aux *.cp *.cps *.fn *.toc *.tp *.vr *.ps *.ky *.pg *.log
156 $(RM) $(MAN) $(TEXI2POD)
160 $(RM) $(SAMPLERCTEXI)
163 # Dependencies for maintenance
168 Makefile: Makefile.in ../config.status
169 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status