Commit f9a9a7d6 authored by Roland Levillain's avatar Roland Levillain
Browse files

Update bootstrap.

	* bootstrap: Update.
	Support the new access to the repository of Gnulib.
	* gnulib.modules: New file.
parent 3109c4ac
2006-03-05 Roland Levillain <roland@lrde.epita.fr>
Update bootstrap.
* bootstrap: Update.
Support the new access to the repository of Gnulib.
* gnulib.modules: New file.
2006-03-05 Roland Levillain <roland@lrde.epita.fr>
* src/inst/fwd.hh: New (forgotten) file.
......
......@@ -2,7 +2,7 @@
# Bootstrap `Nolimips' from repository.
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
# Copyright (C) 2003, 2004, 2005, 2006 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
......@@ -16,13 +16,16 @@
# 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., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# The gnulib-related part comes from GNU tar's bootstrap, written by
# Paul Eggert and Sergey Poznyakoff:
# Parse options.
# Ensure file names are sorted consistently across platforms;
# e.g., m4/ulonglong_gl.m4 should follow m4/ulonglong.m4.
LC_ALL=C
export LC_ALL
usage() {
cat <<EOF
......@@ -45,13 +48,26 @@ Options are:
--cvs-user=USERNAME Set the CVS username to be used when accessing
the gnulib repository.
Running without arguments will suffice in most cases. It is equivalent to:
If the file \`.bootstrap' exists in the current working directory, its
contents is read, comments and empty lines removed, shell variables expanded
and the result is prepended to the command line options.
Running without arguments will suffice in most cases. It is equivalent
to
./bootstrap --cvs-auth=ext --cvs-user=anoncvs
./bootstrap --cvs-auth=pserver
EOF
}
# Read configuration file
if [ -r .bootstrap ]; then
echo "$0: Reading configuration file .bootstrap"
eval set -- "`sed 's/#.*$//;/^$/d' .bootstrap | tr '\n' ' '` $*"
fi
# Parse options.
for option
do
case $option in
......@@ -69,6 +85,7 @@ for option
exit 1;;
esac
done
echo "$0: Bootstrapping Nolimips..."
......@@ -94,31 +111,41 @@ cvs_checkout() {
trap exit 1 2 13 15
trap 'rm -fr $1; exit 1' 0
case "${CVS_AUTH--}" in
-) build_cvs_prefix ext anoncvs
;;
pserver) build_cvs_prefix $CVS_AUTH ${CVS_USER:-anoncvs}
;;
gserver|server)
build_cvs_prefix $CVS_AUTH ${CVS_USER--}
;;
ext) build_cvs_prefix $CVS_AUTH ${CVS_USER--}
;;
*) echo "$0: Unknown CVS access method" >&2
exit 1;;
case "${CVS_AUTH-pserver}" in
pserver) build_cvs_prefix pserver ${CVS_USER:-anonymous}
;;
gserver|server)
build_cvs_prefix $CVS_AUTH ${CVS_USER--}
;;
ext) build_cvs_prefix $CVS_AUTH ${CVS_USER--}
;;
*) echo "$0: Unknown CVS access method" >&2
exit 1;;
esac
if [ "${CVS_AUTH--}" = "pserver" ]; then
cvs -d ${CVS_PREFIX}subversions.gnu.org:/cvsroot/$1 login || exit
fi
cvs -q -d ${CVS_PREFIX}subversions.gnu.org:/cvsroot/$1 co $1 || exit
cvs -q -d ${CVS_PREFIX}cvs.sv.gnu.org:/cvsroot/$1 co $1 || exit
trap 0
trap - 0
fi
}
gnulib_modules=
newline='
'
get_modules() {
new_gnulib_modules=`sed '/^[ ]*#/d; /^[ ]*$/d' $*`
case $gnulib_modules,$new_gnulib_modules in
?*,?*) new_gnulib_modules=$newline$new_gnulib_modules;;
esac
gnulib_modules=$gnulib_modules$new_gnulib_modules
}
# Get gnulib files.
case ${GNULIB_SRCDIR--} in
-) cvs_checkout gnulib
GNULIB_SRCDIR=gnulib
-) cvs_checkout gnulib
GNULIB_SRCDIR=gnulib
esac
......@@ -126,9 +153,9 @@ esac
<$GNULIB_SRCDIR/gnulib-tool || exit
gnulib_modules='
stdint
'
get_modules gnulib.modules
gnulib_modules=`echo "$gnulib_modules" | sort -u`
previous_gnulib_modules=
while [ "$gnulib_modules" != "$previous_gnulib_modules" ]; do
previous_gnulib_modules=$gnulib_modules
......@@ -183,12 +210,13 @@ echo "$0: Creating m4/gnulib.m4"
echo "])") > ./m4/gnulib.m4
echo "$0: Creating lib/Makefile.am"
(cat lib/Makefile.am.tmpl
(echo "# This file is generated automatically. Do not edit!"
cat lib/Makefile.am.tmpl
for gnulib_module in $gnulib_modules; do
echo "# $gnulib_module"
$GNULIB_SRCDIR/gnulib-tool --extract-automake-snippet $gnulib_module
done | sed 's/lib_SOURCES/libnolimips_a_SOURCES/g' ) > lib/Makefile.am
for gnulib_module in $gnulib_modules; do
echo "# $gnulib_module"
$GNULIB_SRCDIR/gnulib-tool --extract-automake-snippet $gnulib_module
done | sed 's/lib_SOURCES/libtar_a_SOURCES/g' ) > lib/Makefile.am
# End of gnulib-related part.
......@@ -206,5 +234,7 @@ find tests -name '*.ref' -exec touch '{}' ';'
# Reconfigure, getting other files.
echo "$0: autoreconf --verbose --install --force ..."
autoreconf --verbose --install --force --make
echo "$0: done."
autoreconf --verbose --install --force || exit 1
echo "$0: done. Now you can run './configure'."
# List of gnulib modules needed for GNU tar.
# A module name per line. Empty lines and comments are ignored.
stdint
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment