2005-11-02 09:27:23 -05:00
|
|
|
# Makefile for `wget' utility
|
2007-09-28 18:45:31 -04:00
|
|
|
# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
|
|
|
# 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
2005-11-02 09:27:23 -05:00
|
|
|
|
|
|
|
# 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
|
2007-07-10 01:53:22 -04:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
2005-11-02 09:27:23 -05:00
|
|
|
# (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
|
2007-07-10 01:53:22 -04:00
|
|
|
# along with Wget. If not, see <http://www.gnu.org/licenses/>.
|
2005-11-02 09:27:23 -05:00
|
|
|
|
|
|
|
# In addition, as a special exception, the Free Software Foundation
|
|
|
|
# gives permission to link the code of its release of Wget with the
|
|
|
|
# OpenSSL project's "OpenSSL" library (or with modified versions of it
|
|
|
|
# that use the same license as the "OpenSSL" library), and distribute
|
|
|
|
# the linked executables. You must obey the GNU General Public License
|
|
|
|
# in all respects for all of the code used other than "OpenSSL". If you
|
|
|
|
# modify this file, you may extend this exception to your version of the
|
|
|
|
# file, but you are not obligated to do so. If you do not wish to do
|
|
|
|
# so, delete this exception statement from your version.
|
|
|
|
|
|
|
|
#
|
|
|
|
# Version: @VERSION@
|
|
|
|
#
|
|
|
|
|
|
|
|
SHELL = /bin/sh
|
|
|
|
|
|
|
|
top_builddir = ..
|
|
|
|
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
|
|
|
sysconfdir = @sysconfdir@
|
|
|
|
datadir = @datadir@
|
|
|
|
localedir = $(datadir)/locale
|
|
|
|
|
|
|
|
DESTDIR =
|
|
|
|
|
|
|
|
CC = @CC@
|
|
|
|
CPPFLAGS = @CPPFLAGS@
|
|
|
|
# The following line is losing on some versions of make!
|
|
|
|
DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
|
|
|
|
CFLAGS = @CFLAGS@
|
|
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
LIBS = @LIBS@ @LIBSSL@ @LIBGNUTLS@
|
|
|
|
exeext = @exeext@
|
|
|
|
|
|
|
|
INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../src
|
|
|
|
|
|
|
|
COMPILE = $(CC) $(INCLUDES) $(CPPFLAGS) $(DEFS) $(CFLAGS)
|
|
|
|
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
RM = rm -f
|
|
|
|
ETAGS = etags
|
|
|
|
|
|
|
|
# Conditional compiles
|
|
|
|
ALLOCA = @ALLOCA@
|
|
|
|
MD5_OBJ = @MD5_OBJ@
|
|
|
|
OPIE_OBJ = @OPIE_OBJ@
|
|
|
|
NTLM_OBJ = @NTLM_OBJ@
|
|
|
|
SSL_OBJ = @SSL_OBJ@
|
|
|
|
GETOPT_OBJ = @GETOPT_OBJ@
|
|
|
|
|
|
|
|
|
|
|
|
all:
|
|
|
|
|
2007-07-12 02:10:48 -04:00
|
|
|
.PHONY: test
|
|
|
|
|
2007-07-12 04:22:08 -04:00
|
|
|
test: @top_srcdir@/src/wget run-unit-tests run-px-tests
|
|
|
|
|
|
|
|
@top_srcdir@/src/wget:
|
|
|
|
cd @top_srcdir@ && $(MAKE)
|
2007-07-12 02:10:48 -04:00
|
|
|
|
|
|
|
run-unit-tests: unit-tests$(exeext)
|
|
|
|
./unit-tests$(exeext)
|
|
|
|
|
|
|
|
run-px-tests: WgetTest.pm
|
2007-08-22 10:05:18 -04:00
|
|
|
./Test-auth-basic.px && echo && echo
|
2007-07-12 02:10:48 -04:00
|
|
|
./Test-c-full.px && echo && echo
|
|
|
|
./Test-c-partial.px && echo && echo
|
|
|
|
./Test-c.px && echo && echo
|
2007-08-22 10:05:18 -04:00
|
|
|
./Test-E-k-K.px && echo && echo
|
|
|
|
./Test-E-k.px && echo && echo
|
2007-07-12 02:10:48 -04:00
|
|
|
./Test-ftp.px && echo && echo
|
2007-08-22 10:05:18 -04:00
|
|
|
./Test-HTTP-Content-Disposition-1.px && echo && echo
|
|
|
|
./Test-HTTP-Content-Disposition-2.px && echo && echo
|
|
|
|
./Test-HTTP-Content-Disposition.px && echo && echo
|
2007-08-30 00:16:24 -04:00
|
|
|
./Test-N-current-HTTP-CD.px && echo && echo
|
2007-07-12 02:10:48 -04:00
|
|
|
./Test-N-current.px && echo && echo
|
2007-08-30 00:16:24 -04:00
|
|
|
./Test-N-HTTP-Content-Disposition.px && echo && echo
|
|
|
|
./Test-N--no-content-disposition.px && echo && echo
|
|
|
|
./Test-N--no-content-disposition-trivial.px && echo && echo
|
|
|
|
./Test--no-content-disposition.px && echo && echo
|
|
|
|
./Test--no-content-disposition-trivial.px && echo && echo
|
2007-08-22 10:05:18 -04:00
|
|
|
./Test-N-old.px && echo && echo
|
|
|
|
./Test-nonexisting-quiet.px && echo && echo
|
|
|
|
./Test-noop.px && echo && echo
|
|
|
|
./Test-np.px && echo && echo
|
|
|
|
./Test-N.px && echo && echo
|
2007-08-30 00:16:24 -04:00
|
|
|
./Test-O-HTTP-Content-Disposition.px && echo && echo
|
|
|
|
./Test-O--no-content-disposition.px && echo && echo
|
|
|
|
./Test-O--no-content-disposition-trivial.px && echo && echo
|
2007-07-12 02:10:48 -04:00
|
|
|
./Test-O-nonexisting.px && echo && echo
|
|
|
|
./Test-O.px && echo && echo
|
2007-08-22 10:05:18 -04:00
|
|
|
./Test-Restrict-Lowercase.px && echo && echo
|
|
|
|
./Test-Restrict-Uppercase.px && echo && echo
|
2007-07-12 02:10:48 -04:00
|
|
|
./Test--spider-fail.px && echo && echo
|
2007-08-30 00:16:24 -04:00
|
|
|
./Test--spider-HTTP-Content-Disposition.px && echo && echo
|
|
|
|
./Test--spider--no-content-disposition.px && echo && echo
|
|
|
|
./Test--spider--no-content-disposition-trivial.px && echo && echo
|
2007-07-12 02:10:48 -04:00
|
|
|
./Test--spider.px && echo && echo
|
2007-08-30 00:16:24 -04:00
|
|
|
./Test--spider-r-HTTP-Content-Disposition.px && echo && echo
|
|
|
|
./Test--spider-r--no-content-disposition.px && echo && echo
|
|
|
|
./Test--spider-r--no-content-disposition-trivial.px && echo && echo
|
2007-07-12 02:10:48 -04:00
|
|
|
./Test--spider-r.px && echo && echo
|
|
|
|
|
|
|
|
WgetTest.pm: WgetTest.pm.in @top_srcdir@/config.status
|
|
|
|
cd @top_srcdir@ && ./config.status
|
2005-11-02 09:27:23 -05:00
|
|
|
|
|
|
|
#
|
|
|
|
# Dependencies for test binary
|
|
|
|
#
|
|
|
|
|
2005-11-02 10:48:45 -05:00
|
|
|
TESTOBJ = $(ALLOCA) cmpt.o connect.o convert.o cookies.o \
|
2005-11-02 09:27:23 -05:00
|
|
|
ftp.o ftp-basic.o ftp-ls.o $(OPIE_OBJ) $(GETOPT_OBJ) hash.o \
|
|
|
|
host.o html-parse.o html-url.o http.o $(NTLM_OBJ) init.o \
|
2005-11-02 10:48:45 -05:00
|
|
|
log.o main.o $(MD5_OBJ) netrc.o progress.o \
|
2005-11-02 09:27:23 -05:00
|
|
|
ptimer.o recur.o res.o retr.o safe-ctype.o snprintf.o \
|
2006-10-12 11:34:33 -04:00
|
|
|
spider.o $(SSL_OBJ) test.o url.o utils.o version.o xmalloc.o
|
2005-11-02 09:27:23 -05:00
|
|
|
|
|
|
|
# We make object files depend on every header. Rather than attempt to
|
|
|
|
# track dependencies, everything gets recompiled when a header
|
|
|
|
# changes. With a program of Wget's size this doesn't waste much
|
|
|
|
# time, and it's a lot safer than attempting to get all the
|
|
|
|
# dependencies right.
|
|
|
|
|
2005-11-02 10:48:45 -05:00
|
|
|
HEADERS = ../src/config-post.h ../src/config.h \
|
2005-11-02 09:27:23 -05:00
|
|
|
../src/connect.h ../src/convert.h ../src/cookies.h \
|
|
|
|
../src/ftp.h ../src/gen-md5.h ../src/getopt.h \
|
|
|
|
../src/gnu-md5.h ../src/hash.h ../src/host.h \
|
|
|
|
../src/html-parse.h ../src/http-ntlm.h ../src/init.h \
|
|
|
|
../src/log.h ../src/mswindows.h ../src/netrc.h \
|
2005-11-02 10:48:45 -05:00
|
|
|
../src/options.h ../src/progress.h \
|
2005-11-02 09:27:23 -05:00
|
|
|
../src/ptimer.h ../src/recur.h ../src/res.h \
|
2006-10-12 11:34:33 -04:00
|
|
|
../src/retr.h ../src/safe-ctype.h ../src/spider.h \
|
|
|
|
../src/ssl.h ../src/sysdep.h ../src/test.h \
|
|
|
|
../src/url.h ../src/utils.h ../src/wget.h \
|
|
|
|
../src/xmalloc.h
|
2005-11-02 09:27:23 -05:00
|
|
|
|
|
|
|
alloca.o: ../src/alloca.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
ccache.o: ../src/ccache.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
cmpt.o: ../src/cmpt.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
connect.o: ../src/connect.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
convert.o: ../src/convert.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
cookies.o: ../src/cookies.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
ftp-basic.o: ../src/ftp-basic.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
ftp.o: ../src/ftp.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
ftp-ls.o: ../src/ftp-ls.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
ftp-opie.o: ../src/ftp-opie.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
gen-md5.o: ../src/gen-md5.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
getopt.o: ../src/getopt.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
gnu-md5.o: ../src/gnu-md5.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
gnutls.o: ../src/gnutls.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
hash.o: ../src/hash.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
host.o: ../src/host.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
html-parse.o: ../src/html-parse.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
html-url.o: ../src/html-url.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
http.o: ../src/http.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
http-ntlm.o: ../src/http-ntlm.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
init.o: ../src/init.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
log.o: ../src/log.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
main.o: ../src/main.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
mswindows.o: ../src/mswindows.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
netrc.o: ../src/netrc.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
openssl.o: ../src/openssl.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
progress.o: ../src/progress.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
protocol.o: ../src/protocol.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
ptimer.o: ../src/ptimer.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
recur.o: ../src/recur.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
res.o: ../src/res.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
retr.o: ../src/retr.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
safe-ctype.o: ../src/safe-ctype.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
snprintf.o: ../src/snprintf.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
2006-10-12 11:34:33 -04:00
|
|
|
spider.o: ../src/spider.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
2005-11-02 09:27:23 -05:00
|
|
|
test.o: ../src/test.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
url.o: ../src/url.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
utils.o: ../src/utils.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
version.o: ../src/version.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
xmalloc.o: ../src/xmalloc.c $(HEADERS)
|
|
|
|
$(COMPILE) -DTESTING -c $<
|
|
|
|
|
|
|
|
|
2007-07-12 02:10:48 -04:00
|
|
|
unit-tests$(exeext): $(TESTOBJ)
|
2005-11-02 09:27:23 -05:00
|
|
|
$(LINK) $(TESTOBJ) $(LIBS)
|
|
|
|
|
|
|
|
#
|
|
|
|
# Dependencies for cleanup
|
|
|
|
#
|
|
|
|
|
|
|
|
clean:
|
2007-07-12 02:10:48 -04:00
|
|
|
$(RM) *.o unit-tests$(exeext) *~ *.bak core core.[0-9]*
|
2005-11-02 09:27:23 -05:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
$(RM) Makefile
|
|
|
|
|
|
|
|
realclean: distclean
|
|
|
|
|
|
|
|
#
|
|
|
|
# Dependencies for maintenance
|
|
|
|
#
|
|
|
|
|
|
|
|
subdir = tests
|
|
|
|
|
|
|
|
Makefile: Makefile.in ../config.status
|
|
|
|
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
|
|
|
|
|