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@
48 INSTALL_DATA = @INSTALL_DATA@
51 TEXI2POD = ./texi2pod.pl
54 WGETRC = $(sysconfdir)/wgetrc
55 SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion
58 # Dependencies for building
61 all: wget.info @COMMENT_IF_NO_POD2MAN@$(MAN)
63 everything: all wget_us.ps wget_a4.ps wget_toc.html
65 $(SAMPLERCTEXI): $(srcdir)/sample.wgetrc
68 wget.info: $(SAMPLERCTEXI) $(srcdir)/wget.texi
69 $(MAKEINFO) -I$(srcdir)
71 $(TEXI2POD): $(srcdir)/$(TEXI2POD).in
72 sed s,/usr/bin/perl,@PERL@, $< > $@
75 wget.pod: $(srcdir)/wget.texi texi2pod.pl
79 $(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $< > $@
86 wget.dvi: $(srcdir)/wget.texi
87 $(TEXI2DVI) $(srcdir)/wget.texi
90 $(DVIPS) -t letter -o $@ wget.dvi
93 $(DVIPS) -t a4 -o $@ wget.dvi
95 wget_toc.html: $(srcdir)/wget.texi
96 $(TEXI2HTML) $(srcdir)/wget.texi
99 # Dependencies for installing
102 # install all the documentation
103 install: install.info install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man
105 # uninstall all the documentation
106 uninstall: uninstall.info @COMMENT_IF_NO_POD2MAN@uninstall.man
108 # install info pages, creating install directory if necessary
109 install.info: wget.info
110 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir)
111 -for file in wget.info wget.info-*[0-9]; do \
112 test -f $$file && $(INSTALL_DATA) $$file $(DESTDIR)$(infodir)/$$file ; \
115 # install man page, creating install directory if necessary
117 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext)
118 $(INSTALL_DATA) $(MAN) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
120 # install sample.wgetrc
121 install.wgetrc: $(srcdir)/sample.wgetrc
122 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
123 @if test -f $(WGETRC); then \
124 if cmp -s $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); then echo ""; \
126 echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new'; \
127 $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new; \
129 echo "WARNING: Differing \`$(DESTDIR)$(WGETRC)'"; \
130 echo " exists and has been spared. You might want to"; \
131 echo " consider merging in the new lines from"; \
132 echo " \`$(DESTDIR)$(WGETRC).new'."; \
134 echo "<Hit RETURN to acknowledge>\c"; \
139 $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); \
142 # uninstall info pages
144 $(RM) $(DESTDIR)$(infodir)/wget.info*
148 $(RM) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
151 # Dependencies for cleanup
155 $(RM) *~ *.bak *.cat *.pod *.html
156 $(RM) *.dvi *.aux *.cp *.cps *.fn *.toc *.tp *.vr *.ps *.ky *.pg *.log
160 $(RM) $(MAN) $(TEXI2POD)
164 $(RM) $(SAMPLERCTEXI)
167 # Dependencies for maintenance
172 Makefile: Makefile.in ../config.status
173 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status