1 # Makefile for `wget' utility
2 # Copyright (C) 1995, 1996, 1997, 2007, 2008, 2009 Free Software
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 # Program to convert DVI files to PostScript
24 # Program to convert texinfo files to html
25 TEXI2HTML = texi2html -expandinfo -split_chapter
30 TEXI2POD = $(srcdir)/texi2pod.pl
33 WGETRC = $(sysconfdir)/wgetrc
34 SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion
37 # Dependencies for building
42 all: wget.info @COMMENT_IF_NO_POD2MAN@$(MAN)
44 everything: all wget_us.ps wget_a4.ps wget_toc.html
46 $(SAMPLERCTEXI): $(srcdir)/sample.wgetrc
49 info_TEXINFOS = wget.texi
50 wget_TEXINFOS = fdl.texi sample.wgetrc.munged_for_texi_inclusion
52 EXTRA_DIST = sample.wgetrc \
56 wget.pod: $(srcdir)/wget.texi version.texi
57 $(TEXI2POD) $(srcdir)/wget.texi $@
60 $(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $? > $@
66 $(DVIPS) -t letter -o $@ wget.dvi
69 $(DVIPS) -t a4 -o $@ wget.dvi
71 wget_toc.html: $(srcdir)/wget.texi
72 $(TEXI2HTML) $(srcdir)/wget.texi
75 # Dependencies for installing
78 # install all the documentation
79 install-data-local: install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man
81 # uninstall all the documentation
82 uninstall-local: @COMMENT_IF_NO_POD2MAN@uninstall.man
85 # install man page, creating install directory if necessary
87 $(mkinstalldirs) $(DESTDIR)$(mandir)/man$(manext)
88 $(INSTALL_DATA) $(MAN) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
90 # install sample.wgetrc
91 install.wgetrc: $(srcdir)/sample.wgetrc
92 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
93 @if test -f $(DESTDIR)$(WGETRC); then \
94 if cmp -s $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); then echo ""; \
96 echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new'; \
97 $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new; \
99 echo "WARNING: Differing \`$(DESTDIR)$(WGETRC)'"; \
100 echo " exists and has been spared. You might want to"; \
101 echo " consider merging in the new lines from"; \
102 echo " \`$(DESTDIR)$(WGETRC).new'."; \
106 $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); \
111 $(RM) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
114 # Dependencies for cleanup
117 CLEANFILES = *~ *.bak *.cat *.pod
118 DISTCLEANFILES = $(MAN)