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 = sample.wgetrc \
55 wget.pod: $(srcdir)/wget.texi version.texi
56 $(TEXI2POD) $(srcdir)/wget.texi $@
59 $(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $? > $@
65 $(DVIPS) -t letter -o $@ wget.dvi
68 $(DVIPS) -t a4 -o $@ wget.dvi
70 wget_toc.html: $(srcdir)/wget.texi
71 $(TEXI2HTML) $(srcdir)/wget.texi
74 # Dependencies for installing
77 # install all the documentation
78 install-data-local: install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man
80 # uninstall all the documentation
81 uninstall-local: @COMMENT_IF_NO_POD2MAN@uninstall.man
84 # install man page, creating install directory if necessary
86 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext)
87 $(INSTALL_DATA) $(MAN) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
89 # install sample.wgetrc
90 install.wgetrc: $(srcdir)/sample.wgetrc
91 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
92 @if test -f $(DESTDIR)$(WGETRC); then \
93 if cmp -s $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); then echo ""; \
95 echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new'; \
96 $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new; \
98 echo "WARNING: Differing \`$(DESTDIR)$(WGETRC)'"; \
99 echo " exists and has been spared. You might want to"; \
100 echo " consider merging in the new lines from"; \
101 echo " \`$(DESTDIR)$(WGETRC).new'."; \
105 $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); \
110 $(RM) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
113 # Dependencies for cleanup
116 CLEANFILES = *~ *.bak *.cat *.pod
117 DISTCLEANFILES = $(MAN)