1 # Makefile for `wget' utility
2 # Copyright (C) 1995, 1996, 1997, 2007, 2008 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 3 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, see <http://www.gnu.org/licenses/>.
21 # Program to convert DVI files to PostScript
23 # Program to convert texinfo files to html
24 TEXI2HTML = texi2html -expandinfo -split_chapter
29 TEXI2POD = $(srcdir)/texi2pod.pl
32 WGETRC = $(sysconfdir)/wgetrc
33 SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion
36 # Dependencies for building
41 all: wget.info @COMMENT_IF_NO_POD2MAN@$(MAN)
43 everything: all wget_us.ps wget_a4.ps wget_toc.html
45 $(SAMPLERCTEXI): $(srcdir)/sample.wgetrc
48 info_TEXINFOS = wget.texi
49 wget_TEXINFOS = fdl.texi sample.wgetrc.munged_for_texi_inclusion
51 EXTRA_DIST = README.maint sample.wgetrc $(SAMPLERCTEXI) \
54 wget.pod: $(srcdir)/wget.texi $(srcdir)/version.texi
55 $(TEXI2POD) $(srcdir)/wget.texi $@
58 $(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $? > $@
64 $(DVIPS) -t letter -o $@ wget.dvi
67 $(DVIPS) -t a4 -o $@ wget.dvi
69 wget_toc.html: $(srcdir)/wget.texi
70 $(TEXI2HTML) $(srcdir)/wget.texi
73 # Dependencies for installing
76 # install all the documentation
77 install-data-local: install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man
79 # uninstall all the documentation
80 uninstall-local: @COMMENT_IF_NO_POD2MAN@uninstall.man
83 # install man page, creating install directory if necessary
85 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext)
86 $(INSTALL_DATA) $(MAN) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
88 # install sample.wgetrc
89 install.wgetrc: $(srcdir)/sample.wgetrc
90 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
91 @if test -f $(DESTDIR)$(WGETRC); then \
92 if cmp -s $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); then echo ""; \
94 echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new'; \
95 $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new; \
97 echo "WARNING: Differing \`$(DESTDIR)$(WGETRC)'"; \
98 echo " exists and has been spared. You might want to"; \
99 echo " consider merging in the new lines from"; \
100 echo " \`$(DESTDIR)$(WGETRC).new'."; \
104 $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); \
109 $(RM) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
112 # Dependencies for cleanup
115 CLEANFILES = *~ *.bak *.cat *.pod
116 DISTCLEANFILES = $(MAN)