summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-08-07 22:32:17 +0200
committerJim Meyering <meyering@redhat.com>2008-08-07 22:32:17 +0200
commit6d554314e220166680f3db5ec372f2df0e7a8976 (patch)
tree4320c04fc60b66383bf368e188699c2ae59b6760 /bootstrap
parente5dd3b175ae3bffe6aa436a1ff41d5c2d6f36672 (diff)
downloadparted-6d554314e220166680f3db5ec372f2df0e7a8976.tar.gz
update build/test infrastructure from coreutils
* bootstrap: Update from coreutils. * maint.mk: Likewise.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap65
1 files changed, 35 insertions, 30 deletions
diff --git a/bootstrap b/bootstrap
index 52d63f2..c834c59 100755
--- a/bootstrap
+++ b/bootstrap
@@ -2,7 +2,7 @@
# Bootstrap this package from checked-out sources.
-# Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003-2008 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
@@ -26,6 +26,8 @@ nl='
LC_ALL=C
export LC_ALL
+local_gl_dir=gl
+
# Temporary directory names.
bt='._bootmp'
bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
@@ -94,6 +96,11 @@ package=`sed -n "$extract_package_name" configure.ac` || exit
gnulib_name=lib$package
build_aux=build-aux
+source_base=lib
+m4_base=m4
+doc_base=doc
+tests_base=tests
+
# Extra files from gnulib, which override files from other sources.
gnulib_extra_files="
$build_aux/install-sh
@@ -119,6 +126,9 @@ XGETTEXT_OPTIONS='\\\
--flag=error:3:c-format --flag=error_at_line:5:c-format\\\
'
+# Package bug report address for gettext files
+MSGID_BUGS_ADDRESS=bug-$package@gnu.org
+
# Files we don't want to import.
excluded_files=
@@ -155,7 +165,7 @@ do
usage
exit;;
--gnulib-srcdir=*)
- GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;;
+ GNULIB_SRCDIR=`expr "X$option" : 'X--gnulib-srcdir=\(.*\)'`;;
--skip-po)
SKIP_PO=t;;
--force)
@@ -223,7 +233,7 @@ case ${GNULIB_SRCDIR--} in
trap cleanup_gnulib 1 2 13 15
- git clone --depth 1 git://git.sv.gnu.org/gnulib ||
+ git clone --depth 2 git://git.sv.gnu.org/gnulib ||
cleanup_gnulib
trap - 1 2 13 15
@@ -263,7 +273,7 @@ update_po_files() {
langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'`
test "$langs" = '*' && langs=x
- for po in `cd $ref_po_dir && echo *.po|sed 's/\.po//g'`; do
+ for po in $langs; do
case $po in x) continue;; esac
new_po="$ref_po_dir/$po.po"
cksum_file="$ref_po_dir/$po.s1"
@@ -404,7 +414,9 @@ version_controlled_file() {
grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
grep '^/[^/]*/[0-9]' > /dev/null && found=yes
elif test -d .git; then
- git-rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
+ git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
+ elif test -d .svn; then
+ svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes
else
echo "$0: no version control for $dir/$file?" >&2
fi
@@ -486,11 +498,11 @@ gnulib_tool_options="\
--import\
--no-changelog\
--aux-dir $bt/$build_aux\
- --doc-base $bt/doc\
+ --doc-base $bt/$doc_base\
--lib $gnulib_name\
- --m4-base $bt/m4/\
- --source-base $bt/lib/\
- --tests-base $bt/tests\
+ --m4-base $bt/$m4_base/\
+ --source-base $bt/$source_base/\
+ --tests-base $bt/$tests_base\
--local-dir $local_gl_dir\
$gnulib_tool_option_extras\
"
@@ -513,28 +525,21 @@ if test $with_gettext = yes; then
cp configure.ac $bt2 &&
(cd $bt2 && autopoint && rm configure.ac) &&
slurp $bt2 $bt || exit
-
- rm -fr $bt $bt2 || exit
fi
+rm -fr $bt $bt2 || exit
+
+# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
+# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
+# The following requires GNU find 4.2.3 or newer. Considering the usual
+# portability constraints of this script, that may seem a very demanding
+# requirement, but it should be ok. Ignore any failure, which is fine,
+# since this is only a convenience to help developers avoid the relatively
+# unusual case in which a symlinked-to .m4 file is git-removed from gnulib
+# between successive runs of this script.
+find "$m4_base" "$source_base" \
+ -depth \( -name '*.m4' -o -name '*.[ch]' \) \
+ -type l -xtype l -delete > /dev/null 2>&1
-# Coreutils is unusual in that it generates some of its test-related
-# Makefile.am files. That must be done before invoking automake.
-mam_template=tests/Makefile.am.in
-if test -f $mam_template; then
- PERL=perl
- for tool in cut head join pr sort tac tail test tr uniq wc; do
- m=tests/$tool/Makefile.am
- t=${m}t
- rm -f $m $t
- sed -n '1,/^##test-files-begin/p' $mam_template > $t
- echo "x = $tool" >> $t
- srcdir=tests/$tool
- $PERL -I$srcdir -w -- tests/mk-script $srcdir --list >> $t
- sed -n '/^##test-files-end/,$p' $mam_template >> $t
- chmod -w $t
- mv $t $m
- done
-fi
# Reconfigure, getting other files.
@@ -571,7 +576,7 @@ if test $with_gettext = yes; then
rm -f po/Makevars
sed '
/^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
- /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
+ /^MSGID_BUGS_ADDRESS *=/s/=.*/= '"$MSGID_BUGS_ADDRESS"'/
/^XGETTEXT_OPTIONS *=/{
s/$/ \\/
a\