1999-12-02 02:42:23 -05:00
|
|
|
# Makefile for `wget' utility
|
|
|
|
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
#
|
|
|
|
# Version: @VERSION@
|
|
|
|
#
|
|
|
|
|
|
|
|
SHELL = /bin/sh
|
|
|
|
|
|
|
|
# Program to format Texinfo source into Info files.
|
|
|
|
MAKEINFO = @MAKEINFO@
|
|
|
|
# Program to format Texinfo source into DVI files.
|
|
|
|
TEXI2DVI = texi2dvi
|
|
|
|
# Program to convert DVI files to PostScript
|
|
|
|
DVIPS = dvips -D 300
|
|
|
|
# Program to convert texinfo files to html
|
|
|
|
TEXI2HTML = texi2html -expandinfo -split_chapter
|
|
|
|
|
2001-03-27 06:23:59 -05:00
|
|
|
top_builddir = ..
|
|
|
|
|
1999-12-02 02:42:23 -05:00
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
infodir = @infodir@
|
|
|
|
mandir = @mandir@
|
|
|
|
manext = 1
|
|
|
|
sysconfdir = @sysconfdir@
|
|
|
|
|
2001-04-12 08:25:22 -04:00
|
|
|
DESTDIR =
|
|
|
|
|
1999-12-02 02:42:23 -05:00
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
RM = rm -f
|
|
|
|
|
2004-05-13 08:32:20 -04:00
|
|
|
TEXI2POD = texi2pod.pl
|
2001-02-22 21:09:36 -05:00
|
|
|
POD2MAN = @POD2MAN@
|
2001-02-10 19:22:42 -05:00
|
|
|
MAN = wget.$(manext)
|
|
|
|
WGETRC = $(sysconfdir)/wgetrc
|
|
|
|
SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion
|
1999-12-02 02:42:23 -05:00
|
|
|
|
|
|
|
#
|
|
|
|
# Dependencies for building
|
|
|
|
#
|
|
|
|
|
2001-02-22 21:09:36 -05:00
|
|
|
all: wget.info @COMMENT_IF_NO_POD2MAN@$(MAN)
|
1999-12-02 02:42:23 -05:00
|
|
|
|
|
|
|
everything: all wget_us.ps wget_a4.ps wget_toc.html
|
|
|
|
|
2001-02-10 19:22:42 -05:00
|
|
|
$(SAMPLERCTEXI): $(srcdir)/sample.wgetrc
|
2001-11-16 12:19:47 -05:00
|
|
|
sed s/@/@@/g $? > $@
|
2000-04-13 15:37:52 -04:00
|
|
|
|
2005-04-25 06:30:36 -04:00
|
|
|
wget.info: $(srcdir)/wget.texi $(SAMPLERCTEXI) $(srcdir)/version.texi
|
2005-04-08 17:01:30 -04:00
|
|
|
$(MAKEINFO) -I$(srcdir) $(srcdir)/wget.texi
|
1999-12-02 02:42:23 -05:00
|
|
|
|
2004-05-13 08:32:20 -04:00
|
|
|
$(TEXI2POD): $(srcdir)/$(TEXI2POD).in
|
2003-09-16 06:20:38 -04:00
|
|
|
sed 's,^#! /usr/bin/perl,#! @PERL@,' $? > $@
|
2001-02-22 21:09:36 -05:00
|
|
|
chmod u+x $@
|
|
|
|
|
2005-04-25 06:30:36 -04:00
|
|
|
wget.pod: $(srcdir)/wget.texi $(TEXI2POD) $(srcdir)/version.texi
|
2004-05-13 08:32:20 -04:00
|
|
|
./$(TEXI2POD) $(srcdir)/wget.texi $@
|
2001-02-10 19:22:42 -05:00
|
|
|
|
|
|
|
$(MAN): wget.pod
|
2001-11-16 12:19:47 -05:00
|
|
|
$(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $? > $@
|
2001-02-10 19:22:42 -05:00
|
|
|
|
1999-12-02 02:42:23 -05:00
|
|
|
#wget.cat: $(MAN)
|
2001-11-16 12:19:47 -05:00
|
|
|
# nroff -man $? > $@
|
1999-12-02 02:42:23 -05:00
|
|
|
|
|
|
|
dvi: wget.dvi
|
|
|
|
|
2001-02-22 21:09:36 -05:00
|
|
|
wget.dvi: $(srcdir)/wget.texi
|
1999-12-02 02:42:23 -05:00
|
|
|
$(TEXI2DVI) $(srcdir)/wget.texi
|
|
|
|
|
|
|
|
wget_us.ps: wget.dvi
|
|
|
|
$(DVIPS) -t letter -o $@ wget.dvi
|
|
|
|
|
|
|
|
wget_a4.ps: wget.dvi
|
|
|
|
$(DVIPS) -t a4 -o $@ wget.dvi
|
|
|
|
|
2001-02-22 21:09:36 -05:00
|
|
|
wget_toc.html: $(srcdir)/wget.texi
|
1999-12-02 02:42:23 -05:00
|
|
|
$(TEXI2HTML) $(srcdir)/wget.texi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Dependencies for installing
|
|
|
|
#
|
|
|
|
|
|
|
|
# install all the documentation
|
2001-02-22 21:09:36 -05:00
|
|
|
install: install.info install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man
|
1999-12-02 02:42:23 -05:00
|
|
|
|
|
|
|
# uninstall all the documentation
|
2001-02-22 21:09:36 -05:00
|
|
|
uninstall: uninstall.info @COMMENT_IF_NO_POD2MAN@uninstall.man
|
1999-12-02 02:42:23 -05:00
|
|
|
|
|
|
|
# install info pages, creating install directory if necessary
|
2001-11-16 18:23:22 -05:00
|
|
|
# if the info pages are built in the build directory, they are used.
|
|
|
|
# otherwise, the ones from the distribution are installed.
|
1999-12-02 02:42:23 -05:00
|
|
|
install.info: wget.info
|
2001-04-12 08:25:22 -04:00
|
|
|
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir)
|
2001-11-16 18:23:22 -05:00
|
|
|
-if test -f wget.info; then \
|
|
|
|
for file in wget.info wget.info-*[0-9]; do \
|
2005-06-06 16:42:17 -04:00
|
|
|
if test -f "$$file"; then \
|
2003-10-23 18:52:17 -04:00
|
|
|
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(infodir)/$$file" ; \
|
2005-06-06 16:42:17 -04:00
|
|
|
fi; \
|
2001-11-16 18:23:22 -05:00
|
|
|
done; \
|
|
|
|
else \
|
|
|
|
for file in $(srcdir)/wget.info $(srcdir)/wget.info-*[0-9]; do \
|
2005-06-06 16:42:17 -04:00
|
|
|
if test -f "$$file"; then \
|
2003-10-23 18:52:17 -04:00
|
|
|
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(infodir)/`basename $$file`" ; \
|
2005-06-06 16:42:17 -04:00
|
|
|
fi; \
|
2001-11-16 18:23:22 -05:00
|
|
|
done; \
|
|
|
|
fi
|
1999-12-02 02:42:23 -05:00
|
|
|
|
|
|
|
# install man page, creating install directory if necessary
|
2001-02-22 21:09:36 -05:00
|
|
|
install.man: $(MAN)
|
2001-04-12 08:25:22 -04:00
|
|
|
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext)
|
2001-06-05 17:43:14 -04:00
|
|
|
$(INSTALL_DATA) $(MAN) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
|
1999-12-02 02:42:23 -05:00
|
|
|
|
|
|
|
# install sample.wgetrc
|
2001-02-22 21:09:36 -05:00
|
|
|
install.wgetrc: $(srcdir)/sample.wgetrc
|
2001-06-15 09:31:56 -04:00
|
|
|
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
|
2001-06-15 14:36:31 -04:00
|
|
|
@if test -f $(DESTDIR)$(WGETRC); then \
|
2001-04-12 08:25:22 -04:00
|
|
|
if cmp -s $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); then echo ""; \
|
1999-12-02 02:42:23 -05:00
|
|
|
else \
|
2001-04-12 08:25:22 -04:00
|
|
|
echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new'; \
|
|
|
|
$(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new; \
|
2000-04-13 00:37:51 -04:00
|
|
|
echo; \
|
2001-04-12 08:25:22 -04:00
|
|
|
echo "WARNING: Differing \`$(DESTDIR)$(WGETRC)'"; \
|
2000-04-13 00:55:35 -04:00
|
|
|
echo " exists and has been spared. You might want to"; \
|
|
|
|
echo " consider merging in the new lines from"; \
|
2001-04-12 08:25:22 -04:00
|
|
|
echo " \`$(DESTDIR)$(WGETRC).new'."; \
|
2000-04-13 00:37:51 -04:00
|
|
|
echo; \
|
1999-12-02 02:42:23 -05:00
|
|
|
fi; \
|
|
|
|
else \
|
2001-04-12 08:25:22 -04:00
|
|
|
$(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); \
|
1999-12-02 02:42:23 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
# uninstall info pages
|
|
|
|
uninstall.info:
|
2001-04-12 08:25:22 -04:00
|
|
|
$(RM) $(DESTDIR)$(infodir)/wget.info*
|
1999-12-02 02:42:23 -05:00
|
|
|
|
|
|
|
# uninstall man page
|
2001-02-10 19:22:42 -05:00
|
|
|
uninstall.man:
|
2001-04-12 08:25:22 -04:00
|
|
|
$(RM) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
|
1999-12-02 02:42:23 -05:00
|
|
|
|
|
|
|
#
|
|
|
|
# Dependencies for cleanup
|
|
|
|
#
|
|
|
|
|
|
|
|
clean:
|
2001-02-10 19:22:42 -05:00
|
|
|
$(RM) *~ *.bak *.cat *.pod *.html
|
1999-12-02 02:42:23 -05:00
|
|
|
$(RM) *.dvi *.aux *.cp *.cps *.fn *.toc *.tp *.vr *.ps *.ky *.pg *.log
|
|
|
|
|
|
|
|
distclean: clean
|
2000-12-31 06:50:52 -05:00
|
|
|
$(RM) Makefile
|
2001-02-22 21:09:36 -05:00
|
|
|
$(RM) $(MAN) $(TEXI2POD)
|
1999-12-02 02:42:23 -05:00
|
|
|
|
|
|
|
realclean: distclean
|
|
|
|
$(RM) wget.info*
|
2001-02-10 19:22:42 -05:00
|
|
|
$(RM) $(SAMPLERCTEXI)
|
1999-12-02 02:42:23 -05:00
|
|
|
|
|
|
|
#
|
|
|
|
# Dependencies for maintenance
|
|
|
|
#
|
|
|
|
|
|
|
|
subdir = doc
|
|
|
|
|
|
|
|
Makefile: Makefile.in ../config.status
|
|
|
|
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
|