2001-11-25 11:53:41 -05:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
# Copyright (C) 2001 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.
|
|
|
|
|
2002-05-17 22:16:36 -04: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.
|
|
|
|
|
2001-11-25 11:53:41 -05:00
|
|
|
CVSROOT=:pserver:cvs@sunsite.dk:/pack/anoncvs
|
|
|
|
DIR=$HOME/work/tmp
|
2002-05-20 23:27:17 -04:00
|
|
|
SUBDIR=wget.cvs.$$
|
2001-11-25 11:53:41 -05:00
|
|
|
DEBUG=no
|
|
|
|
|
2002-05-20 23:27:17 -04:00
|
|
|
EXPORT_TAG='-D now'
|
|
|
|
VERSION=
|
|
|
|
|
|
|
|
while test x"$*" != x
|
|
|
|
do
|
|
|
|
case "$1" in
|
2001-11-25 11:53:41 -05:00
|
|
|
-d)
|
|
|
|
DEBUG=yes
|
|
|
|
;;
|
2002-05-20 23:27:17 -04:00
|
|
|
-D)
|
|
|
|
shift
|
|
|
|
EXPORT_TAG="-D '$1'"
|
|
|
|
;;
|
|
|
|
-r)
|
|
|
|
shift
|
|
|
|
EXPORT_TAG="-r $1"
|
|
|
|
;;
|
|
|
|
--force-version)
|
|
|
|
shift
|
|
|
|
VERSION=$1
|
2001-11-25 11:53:41 -05:00
|
|
|
;;
|
|
|
|
*)
|
2002-05-20 23:27:17 -04:00
|
|
|
echo "Usage: $0 [-d] [-r TAG | -D DATE]" >&2
|
2001-11-25 11:53:41 -05:00
|
|
|
exit 1
|
|
|
|
esac
|
2002-05-20 23:27:17 -04:00
|
|
|
shift
|
2001-11-25 11:53:41 -05:00
|
|
|
done
|
|
|
|
|
|
|
|
# Resolve echo -n incompatibilities.
|
|
|
|
e_n=-n
|
|
|
|
e_c=
|
|
|
|
if test "`(echo foo; echo -n bar) | tr '[\012]' x`" != fooxbar; then
|
|
|
|
e_n=
|
|
|
|
e_c='\c'
|
|
|
|
fi
|
|
|
|
|
|
|
|
# File for output/errors redirection.
|
|
|
|
O=$DIR/dist-output
|
|
|
|
|
|
|
|
cd $DIR
|
|
|
|
|
|
|
|
echo "Building wget dist in $DIR."
|
|
|
|
echo "Output from commands is in $DIR/dist-output."
|
|
|
|
|
|
|
|
echo "-----------" >$O
|
|
|
|
|
2002-05-20 23:27:17 -04:00
|
|
|
# Checkout clean sources from the repository.
|
|
|
|
echo $e_n "Exporting ($EXPORT_TAG) out the CVS tree to $SUBDIR... $e_c"
|
|
|
|
cvs -d $CVSROOT export $EXPORT_TAG -d $SUBDIR wget 1>>$O 2>&1
|
|
|
|
echo "done."
|
2001-11-25 11:53:41 -05:00
|
|
|
|
2002-05-20 23:27:17 -04:00
|
|
|
cd $SUBDIR
|
2001-11-25 11:53:41 -05:00
|
|
|
|
|
|
|
# Remove the dummy `Branches' directory.
|
|
|
|
rm -rf Branches 1>>$O 2>&1
|
|
|
|
|
2002-05-20 23:27:17 -04:00
|
|
|
# Force the version if required.
|
|
|
|
if test x"$VERSION" != x
|
|
|
|
then
|
|
|
|
echo "char *version_string = \"$VERSION\";" > src/version.c
|
|
|
|
echo "Forcing version to $VERSION."
|
|
|
|
fi
|
|
|
|
|
2001-11-25 11:53:41 -05:00
|
|
|
# Create configure and friends.
|
|
|
|
if ! test -f configure; then
|
|
|
|
echo $e_n "Creating \`configure' from \`configure.in'... $e_c"
|
|
|
|
make -f Makefile.cvs 1>>$O 2>&1
|
|
|
|
echo "done."
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Remove `Makefile' if it already exists.
|
|
|
|
if test -f Makefile; then
|
|
|
|
echo $e_n "Cleaning old Makefiles with \`make distclean'... $e_c"
|
|
|
|
make distclean 1>>$O 2>&1
|
|
|
|
echo "done."
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Create a new `Makefile'.
|
|
|
|
echo $e_n "Running configure... $e_c"
|
|
|
|
CFLAGS=-g ./configure 1>>$O 2>&1
|
|
|
|
echo "done."
|
|
|
|
|
|
|
|
# Now build the MO files.
|
|
|
|
echo $e_n "Building MO files out of PO files... $e_c"
|
|
|
|
cd po
|
|
|
|
make 1>>$O 2>&1
|
|
|
|
cd ..
|
|
|
|
echo "done."
|
|
|
|
|
|
|
|
# Now build the Info documentation and the man page.
|
|
|
|
echo $e_n "Building Info and man documentation... $e_c"
|
|
|
|
cd doc
|
|
|
|
make 1>>$O 2>&1
|
|
|
|
cd ..
|
|
|
|
echo "done."
|
|
|
|
|
|
|
|
# Create the distribution file.
|
|
|
|
echo $e_n "Creating distribution tarball... $e_c"
|
|
|
|
make dist 1>>$O 2>&1
|
|
|
|
mv wget-*.tar.gz ../
|
|
|
|
echo "done."
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
2002-05-20 23:27:17 -04:00
|
|
|
if test $DEBUG = no; then
|
|
|
|
rm -rf $SUBDIR 1>>$O 2>&1
|
2001-11-25 11:53:41 -05:00
|
|
|
fi
|