diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 00000000..b759dd47
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,65 @@
+# Makefile for `Wget' utility
+# Copyright (C) 1995, 1996, 1997, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1995, 1996, 1997, 2006, 2007 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 3 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, see .
+
+# 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@
+#
+
+# Search for macros in the m4 subdirectory:
+ACLOCAL_AMFLAGS = -I m4
+
+# These are used for maintenance only, so they are safe without
+# special autoconf cruft.
+RM = rm -f
+
+# subdirectories in the distribution
+SUBDIRS = src doc po tests util windows
+
+test: all
+ cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
+
+EXTRA_DIST = autogen.sh ChangeLog.README configure.bat MAILING-LIST PATCHES \
+ README.checkout
+
+#
+# Cleanup dependencies
+#
+
+realclean: realclean-recursive realclean-top
+
+CLEANFILES = *~ *.bak $(DISTNAME).tar.gz
+distclean-local:
+ $(RM) -r autom4te.cache
+
+realclean-top: distclean-am
+ $(RM) configure
+
+realclean-recursive:
+ for subdir in $(SUBDIRS); do \
+ target=`echo $@ | sed s/-recursive//`; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) || exit 1; \
+ done
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644
index a680164e..00000000
--- a/Makefile.in
+++ /dev/null
@@ -1,186 +0,0 @@
-# Makefile for `Wget' utility
-# Copyright (C) 1995, 1996, 1997, 2006, 2007 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 3 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, see .
-
-# 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
-@SET_MAKE@
-
-top_builddir = .
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-#
-# User configuration section
-#
-
-#
-# Install variables
-#
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-infodir = @infodir@
-sysconfdir = @sysconfdir@
-mandir = @mandir@
-manext = 1
-localedir = $(prefix)/share/locale
-
-CC = @CC@
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
-DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
-LIBS = @LIBS@ @LIBSSL@ @LIBGNUTLS@
-LDFLAGS = @LDFLAGS@
-
-#
-# End of user configuration section. There should be no need to change
-# anything below this line.
-#
-
-DISTNAME = wget-@VERSION@
-RM = rm -f
-
-# These are used for maintenance only, so they are safe without
-# special autoconf cruft.
-FIND = find
-GZIP = gzip
-TAR = tar
-
-# flags passed to recursive makes in subdirectories
-MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
-CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
-DESTDIR='$(DESTDIR)' prefix='$(prefix)' exec_prefix='$(exec_prefix)' \
-bindir='$(bindir)' infodir='$(infodir)' mandir='$(mandir)' \
-manext='$(manext)'
-
-# subdirectories in the distribution
-SUBDIRS = src doc po tests util windows
-
-# default target
-all: src/config.h Makefile $(SUBDIRS)
-
-test: src/config.h Makefile src
- cd tests && $(MAKE) $(MAKEDEFS) $@
-
-check: all
-
-$(SUBDIRS): FORCE
- cd $@ && $(MAKE) $(MAKEDEFS)
-
-# install everything
-install: install.bin install.info install.wgetrc \
- install.mo @COMMENT_IF_NO_POD2MAN@install.man
-
-# install/uninstall the binary
-install.bin uninstall.bin:
- cd src && $(MAKE) $(MAKEDEFS) $@
-
-# install/uninstall the info/man pages
-install.info uninstall.info install.man uninstall.man install.wgetrc:
- cd doc && $(MAKE) $(MAKEDEFS) $@
-
-# Install `.mo' files
-install.mo:
- cd po && $(MAKE) $(MAKEDEFS) $@
-
-# create tag files for Emacs
-TAGS:
- cd src && $(MAKE) $@
-
-dist: $(srcdir)/configure DISTFILES
- mkdir $(DISTNAME)
- for d in `$(FIND) . -type d ! -regex '.*/\.svn\(/.*\)?' -print`; do \
- if [ "$$d" != "." -a "$$d" != "./$(DISTNAME)" ]; then \
- mkdir $(DISTNAME)/$$d; \
- fi; \
- done
- for f in `cat DISTFILES`; do \
- ln $(srcdir)/$$f $(DISTNAME)/$$f || \
- { echo copying $$f; cp -p $(srcdir)/$$f $(DISTNAME)/$$f ; } \
- done
- (cd $(DISTNAME); $(MAKE) distclean)
- $(TAR) chvf - $(DISTNAME) | $(GZIP) -c --best >$(DISTNAME).tar.gz
- $(RM) -r $(DISTNAME)
- $(RM) DISTFILES
-
-DISTFILES: FORCE
- rm -rf $(DISTNAME)
- (cd $(srcdir); find . ! -type d -print) \
- | sed '/\/\.svn\//d; /$@/d; /\.tar.*/d; s/^.\///; /^\.$$/d;' \
- | sort | uniq > $@
-
-#
-# Cleanup dependencies
-#
-
-clean: clean-recursive clean-top
-distclean: distclean-recursive distclean-top
-realclean: realclean-recursive realclean-top
-
-clean-top:
- $(RM) *~ *.bak $(DISTNAME).tar.gz
-
-distclean-top: clean-top
- $(RM) Makefile config.status config.log config.cache libtool stamp-h
- $(RM) -r autom4te.cache
-
-realclean-top: distclean-top
- $(RM) configure
-
-clean-recursive distclean-recursive realclean-recursive:
- for subdir in $(SUBDIRS); do \
- target=`echo $@ | sed s/-recursive//`; \
- (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
- done
-
-#
-# Dependencies for maintenance
-#
-
-$(srcdir)/configure: configure.in
- cd $(srcdir) && autoconf
-
-# autoheader might not change config.h.in, so touch a stamp file.
-$(srcdir)/src/config.h.in: stamp-h.in
-$(srcdir)/stamp-h.in: configure.in
- @true; # running autoheader here breaks: cd $(srcdir) && autoheader
- echo timestamp > $(srcdir)/stamp-h.in
-
-src/config.h: stamp-h
-stamp-h: src/config.h.in config.status
- ./config.status
-
-Makefile: Makefile.in config.status
- ./config.status
-
-config.status: configure
- ./config.status --recheck
-
-FORCE:
diff --git a/doc/Makefile.in b/doc/Makefile.am
similarity index 61%
rename from doc/Makefile.in
rename to doc/Makefile.am
index 8330e939..9a1d514e 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.am
@@ -18,33 +18,12 @@
# 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
-top_builddir = ..
-
-top_srcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-prefix = @prefix@
-infodir = @infodir@
-mandir = @mandir@
manext = 1
-sysconfdir = @sysconfdir@
-
-DESTDIR =
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
RM = rm -f
TEXI2POD = $(srcdir)/texi2pod.pl
@@ -57,6 +36,8 @@ SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion
# Dependencies for building
#
+man_MANS = $(MAN)
+
all: wget.info @COMMENT_IF_NO_POD2MAN@$(MAN)
everything: all wget_us.ps wget_a4.ps wget_toc.html
@@ -64,8 +45,11 @@ everything: all wget_us.ps wget_a4.ps wget_toc.html
$(SAMPLERCTEXI): $(srcdir)/sample.wgetrc
sed s/@/@@/g $? > $@
-wget.info: $(srcdir)/wget.texi $(SAMPLERCTEXI) $(srcdir)/version.texi
- $(MAKEINFO) -I$(srcdir) $(srcdir)/wget.texi
+info_TEXINFOS = wget.texi
+wget_TEXINFOS = fdl.texi
+
+EXTRA_DIST = README.maint sample.wgetrc $(SAMPLERCTEXI) \
+ texi2pod.pl
wget.pod: $(srcdir)/wget.texi $(srcdir)/version.texi
$(TEXI2POD) $(srcdir)/wget.texi $@
@@ -76,11 +60,6 @@ $(MAN): wget.pod
#wget.cat: $(MAN)
# nroff -man $? > $@
-dvi: wget.dvi
-
-wget.dvi: $(srcdir)/wget.texi
- $(TEXI2DVI) $(srcdir)/wget.texi
-
wget_us.ps: wget.dvi
$(DVIPS) -t letter -o $@ wget.dvi
@@ -95,29 +74,11 @@ wget_toc.html: $(srcdir)/wget.texi
#
# install all the documentation
-install: install.info install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man
+install-data-local: install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man
# uninstall all the documentation
-uninstall: uninstall.info @COMMENT_IF_NO_POD2MAN@uninstall.man
+uninstall-local: @COMMENT_IF_NO_POD2MAN@uninstall.man
-# install info pages, creating install directory if necessary
-# if the info pages are built in the build directory, they are used.
-# otherwise, the ones from the distribution are installed.
-install.info: wget.info
- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir)
- -if test -f wget.info; then \
- for file in wget.info wget.info-*[0-9]; do \
- if test -f "$$file"; then \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(infodir)/$$file" ; \
- fi; \
- done; \
- else \
- for file in $(srcdir)/wget.info $(srcdir)/wget.info-*[0-9]; do \
- if test -f "$$file"; then \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(infodir)/`basename $$file`" ; \
- fi; \
- done; \
- fi
# install man page, creating install directory if necessary
install.man: $(MAN)
@@ -143,10 +104,6 @@ install.wgetrc: $(srcdir)/sample.wgetrc
$(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); \
fi
-# uninstall info pages
-uninstall.info:
- $(RM) $(DESTDIR)$(infodir)/wget.info*
-
# uninstall man page
uninstall.man:
$(RM) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
@@ -155,23 +112,9 @@ uninstall.man:
# Dependencies for cleanup
#
-clean:
- $(RM) *~ *.bak *.cat *.pod *.html
- $(RM) *.dvi *.aux *.cp *.cps *.fn *.toc *.tp *.vr *.ps *.ky *.pg *.log
-
-distclean: clean
- $(RM) Makefile
- $(RM) $(MAN)
+CLEANFILES = *~ *.bak *.cat *.pod
+DISTCLEANFILES = $(MAN)
realclean: distclean
$(RM) wget.info*
$(RM) $(SAMPLERCTEXI)
-
-#
-# Dependencies for maintenance
-#
-
-subdir = doc
-
-Makefile: Makefile.in ../config.status
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 00000000..257ed156
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,55 @@
+# Makefile for `wget' utility
+# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+# 2004, 2005, 2006, 2007 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 3 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 Wget. If not, see .
+
+# 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@
+#
+
+# The following line is losing on some versions of make!
+DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
+LIBS = @LIBS@ @LIBSSL@ @LIBGNUTLS@
+
+bin_PROGRAMS = wget
+wget_SOURCES = cmpt.c connect.c convert.c cookies.c ftp.c ftp-basic.c \
+ ftp-ls.c hash.c host.c html-parse.c html-url.c http.c \
+ init.c log.c main.c netrc.c progress.c ptimer.c recur.c \
+ res.c retr.c safe-ctype.c snprintf.c spider.c url.c \
+ utils.c version.c xmalloc.c \
+ config-post.h connect.h convert.h cookies.h \
+ ftp.h gen-md5.h getopt.h gnu-md5.h hash.h host.h html-parse.h \
+ http.h http-ntlm.h init.h log.h mswindows.h netrc.h \
+ options.h progress.h ptimer.h recur.h res.h retr.h safe-ctype.h \
+ spider.h ssl.h sysdep.h url.h utils.h wget.h xmalloc.h
+EXTRA_wget_SOURCES = mswindows.c
+LDADD = $(ALLOCA) $(LIBOBJS)
+
+check_LIBRARIES = libunittest.a
+libunittest_a_SOURCES = $(wget_SOURCES) test.c test.h
+libunittest_a_CPPFLAGS = -DTESTING
+libunittest_a_LIBADD = $(ALLOCA) $(LIBOBJS)
+
+CLEANFILES = *~ *.bak core core.[0-9]*
diff --git a/src/Makefile.in b/src/Makefile.in
deleted file mode 100644
index 24bc1cba..00000000
--- a/src/Makefile.in
+++ /dev/null
@@ -1,143 +0,0 @@
-# Makefile for `wget' utility
-# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-# 2004, 2005, 2006, 2007 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 3 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 Wget. If not, see .
-
-# 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)
-
-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@
-
-OBJ = $(ALLOCA) cmpt.o connect.o convert.o cookies.o \
- 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 \
- log.o main.o $(MD5_OBJ) netrc.o progress.o ptimer.o recur.o \
- res.o retr.o safe-ctype.o snprintf.o spider.o $(SSL_OBJ) \
- url.o utils.o version.o xmalloc.o
-
-.SUFFIXES:
-.SUFFIXES: .c .o
-
-.c.o:
- $(COMPILE) -c $<
-
-# Dependencies for building
-
-wget$(exeext): $(OBJ)
- $(LINK) $(OBJ) $(LIBS)
-
-# 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.
-
-$(OBJ): config-post.h config.h connect.h convert.h cookies.h ftp.h \
- gen-md5.h getopt.h gnu-md5.h hash.h host.h html-parse.h \
- http-ntlm.h init.h log.h mswindows.h netrc.h options.h \
- progress.h ptimer.h recur.h res.h retr.h safe-ctype.h \
- spider.h ssl.h sysdep.h url.h utils.h wget.h xmalloc.h
-
-#
-# Dependencies for installing
-#
-
-install: install.bin
-
-uninstall: uninstall.bin
-
-install.bin: wget$(exeext)
- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) wget$(exeext) $(DESTDIR)$(bindir)/wget$(exeext)
-
-uninstall.bin:
- $(RM) $(DESTDIR)$(bindir)/wget$(exeext)
-
-#
-# Dependencies for cleanup
-#
-
-clean:
- $(RM) *.o wget$(exeext) *~ *.bak core core.[0-9]*
-
-distclean: clean
- $(RM) Makefile config.h
-
-realclean: distclean
- $(RM) TAGS config.h.in
-
-#
-# Dependencies for maintenance
-#
-
-subdir = src
-
-Makefile: Makefile.in ../config.status
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
-
-TAGS: *.c *.h
- -$(ETAGS) *.c *.h
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 00000000..c8f6e833
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,103 @@
+# Makefile for `wget' utility
+# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+# 2004, 2005, 2006, 2007 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 3 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 Wget. If not, see .
+
+# 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@
+#
+
+PERL = perl
+PERLRUN = $(PERL) -I$(srcdir)
+
+.PHONY: test run-unit-tests run-px-tests
+
+check-local: test
+
+test: ../src/wget$(EXEEXT) run-unit-tests run-px-tests
+
+../src/wget$(EXEEXT):
+ cd ../src && $(MAKE) $(AM_MAKEFLAGS)
+
+run-unit-tests: unit-tests$(EXEEXT)
+ ./unit-tests$(EXEEXT)
+
+run-px-tests: WgetTest.pm
+ $(PERLRUN) $(srcdir)/Test-auth-basic.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-c-full.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-c-partial.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-c.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-E-k-K.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-E-k.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-ftp.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-HTTP-Content-Disposition-1.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-HTTP-Content-Disposition-2.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-HTTP-Content-Disposition.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-N-current-HTTP-CD.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-N-current.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-N-HTTP-Content-Disposition.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-N--no-content-disposition.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-N--no-content-disposition-trivial.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test--no-content-disposition.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test--no-content-disposition-trivial.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-N-old.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-nonexisting-quiet.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-noop.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-np.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-N.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-O-HTTP-Content-Disposition.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-O--no-content-disposition.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-O--no-content-disposition-trivial.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-O-nonexisting.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-O.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-Restrict-Lowercase.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test-Restrict-Uppercase.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test--spider-fail.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test--spider-HTTP-Content-Disposition.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test--spider--no-content-disposition.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test--spider--no-content-disposition-trivial.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test--spider.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test--spider-r-HTTP-Content-Disposition.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test--spider-r--no-content-disposition.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test--spider-r--no-content-disposition-trivial.px && echo && echo
+ $(PERLRUN) $(srcdir)/Test--spider-r.px && echo && echo
+
+EXTRA_DIST = FTPServer.pm FTPTest.pm HTTPServer.pm HTTPTest.pm \
+ Test-auth-basic.px Test-c-full.px Test-c-partial.px \
+ Test-c.px Test-E-k-K.px Test-E-k.px Test-ftp.px \
+ Test-HTTP-Content-Disposition-1.px \
+ Test-HTTP-Content-Disposition-2.px \
+ Test-HTTP-Content-Disposition.px \
+ Test-N-current.px Test-N-old.px Test-nonexisting-quiet.px \
+ Test-noop.px Test-np.px Test-N.px \
+ Test-O-nonexisting.px Test-O.px \
+ Test-Restrict-Lowercase.px Test-Restrict-Uppercase.px \
+ Test--spider-fail.px Test--spider.px Test--spider-r.px
+
+check_PROGRAMS = unit-tests
+unit_tests_SOURCES =
+LDADD = ../src/libunittest.a
+
+CLEANFILES = *~ *.bak core core.[0-9]*
diff --git a/tests/Makefile.in b/tests/Makefile.in
deleted file mode 100644
index 920186ce..00000000
--- a/tests/Makefile.in
+++ /dev/null
@@ -1,305 +0,0 @@
-# Makefile for `wget' utility
-# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-# 2004, 2005, 2006, 2007 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 3 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 Wget. If not, see .
-
-# 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:
-
-.PHONY: test
-
-test: @top_srcdir@/src/wget run-unit-tests run-px-tests
-
-@top_srcdir@/src/wget:
- cd @top_srcdir@ && $(MAKE)
-
-run-unit-tests: unit-tests$(exeext)
- ./unit-tests$(exeext)
-
-run-px-tests: WgetTest.pm
- ./Test-auth-basic.px && echo && echo
- ./Test-c-full.px && echo && echo
- ./Test-c-partial.px && echo && echo
- ./Test-c.px && echo && echo
- ./Test-E-k-K.px && echo && echo
- ./Test-E-k.px && echo && echo
- ./Test-ftp.px && echo && echo
- ./Test-HTTP-Content-Disposition-1.px && echo && echo
- ./Test-HTTP-Content-Disposition-2.px && echo && echo
- ./Test-HTTP-Content-Disposition.px && echo && echo
- ./Test-N-current-HTTP-CD.px && echo && echo
- ./Test-N-current.px && echo && echo
- ./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
- ./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
- ./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
- ./Test-O-nonexisting.px && echo && echo
- ./Test-O.px && echo && echo
- ./Test-Restrict-Lowercase.px && echo && echo
- ./Test-Restrict-Uppercase.px && echo && echo
- ./Test--spider-fail.px && echo && echo
- ./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
- ./Test--spider.px && echo && echo
- ./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
- ./Test--spider-r.px && echo && echo
-
-WgetTest.pm: WgetTest.pm.in @top_srcdir@/config.status
- cd @top_srcdir@ && ./config.status
-
-#
-# Dependencies for test binary
-#
-
-TESTOBJ = $(ALLOCA) cmpt.o connect.o convert.o cookies.o \
- 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 \
- log.o main.o $(MD5_OBJ) netrc.o progress.o \
- ptimer.o recur.o res.o retr.o safe-ctype.o snprintf.o \
- spider.o $(SSL_OBJ) test.o url.o utils.o version.o xmalloc.o
-
-# 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.
-
-HEADERS = ../src/config-post.h ../src/config.h \
- ../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 \
- ../src/options.h ../src/progress.h \
- ../src/ptimer.h ../src/recur.h ../src/res.h \
- ../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
-
-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 $<
-
-spider.o: ../src/spider.c $(HEADERS)
- $(COMPILE) -DTESTING -c $<
-
-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 $<
-
-
-unit-tests$(exeext): $(TESTOBJ)
- $(LINK) $(TESTOBJ) $(LIBS)
-
-#
-# Dependencies for cleanup
-#
-
-clean:
- $(RM) *.o unit-tests$(exeext) *~ *.bak core core.[0-9]*
-
-distclean: clean
- $(RM) Makefile
-
-realclean: distclean
-
-#
-# Dependencies for maintenance
-#
-
-subdir = tests
-
-Makefile: Makefile.in ../config.status
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
-
diff --git a/util/Makefile.in b/util/Makefile.am
similarity index 89%
rename from util/Makefile.in
rename to util/Makefile.am
index a4681f4d..83c79d27 100644
--- a/util/Makefile.in
+++ b/util/Makefile.am
@@ -28,21 +28,5 @@
# Version: @VERSION@
#
-SHELL = /bin/sh
-
-top_builddir = ..
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-RM = rm -f
-
-all:
-
-clean:
-
-distclean: clean
- $(RM) Makefile
-
-realclean: distclean
-
+EXTRA_DIST = dist-wget download.html download-netscape.html \
+ rmold.pl update_po_files.sh wget.spec
diff --git a/windows/Makefile.in b/windows/Makefile.am
similarity index 90%
rename from windows/Makefile.in
rename to windows/Makefile.am
index d6b591d9..914bbb74 100644
--- a/windows/Makefile.in
+++ b/windows/Makefile.am
@@ -32,21 +32,6 @@
# succeeds. This directory is not used under Unix builds, normally
# affected by Makefile.in.
-SHELL = /bin/sh
-
-top_builddir = ..
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-RM = rm -f
-
-all:
-
-clean:
-
-distclean: clean
- $(RM) Makefile
-
-realclean: distclean
-
+EXTRA_DIST = config-compiler.h config.h Makefile.doc \
+ Makefile.src Makefile.src.bor Makefile.src.mingw \
+ Makefile.top Makefile.top.bor Makefile.top.mingw