summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2013-03-22 04:39:25 +0100
committerJim Meyering <meyering@fb.com>2013-03-21 21:39:21 -0700
commit90fd310a7865bf4ae695aaab0f21a9ab71f849f8 (patch)
tree0b7a4865707eab2978edfd8d6017a5a90eb5bde9
parentb2f1e4bc555073d43b664c4389569a195ff040e3 (diff)
downloaddiffutils-90fd310a7865bf4ae695aaab0f21a9ab71f849f8.tar.gz
build: update gnulib to latest and adapt; update bootstrap, too
Blindly updating to the latest from gnulib, bootstrap would fail due to failure of our local patches to apply. Hence, these first two updates. * gl/lib/regex_internal.c.diff: Update offsets, so this patch applies to the latest from gnulib. * gl/lib/regex_internal.h.diff: Remove file. No longer needed. * bootstrap: Update from gnulib.
-rwxr-xr-xbootstrap57
-rw-r--r--gl/lib/regex_internal.c.diff4
-rw-r--r--gl/lib/regex_internal.h.diff14
m---------gnulib0
4 files changed, 31 insertions, 44 deletions
diff --git a/bootstrap b/bootstrap
index 48181c9..bee7765 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
-scriptversion=2012-07-19.14; # UTC
+scriptversion=2013-01-20.16; # UTC
# Bootstrap this package from checked-out sources.
@@ -306,34 +306,34 @@ if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
die "Bootstrapping from a non-checked-out distribution is risky."
fi
-# Ensure that lines starting with ! sort last, per gitignore conventions
-# for whitelisting exceptions after a more generic blacklist pattern.
-sort_patterns() {
- sort -u "$@" | sed '/^!/ {
- H
- d
- }
- $ {
- P
- x
- s/^\n//
- }' | sed '/^$/d'
+# Strip blank and comment lines to leave significant entries.
+gitignore_entries() {
+ sed '/^#/d; /^$/d' "$@"
}
-# If $STR is not already on a line by itself in $FILE, insert it,
-# sorting the new contents of the file and replacing $FILE with the result.
-insert_sorted_if_absent() {
+# If $STR is not already on a line by itself in $FILE, insert it at the start.
+# Entries are inserted at the start of the ignore list to ensure existing
+# entries starting with ! are not overridden. Such entries support
+# whitelisting exceptions after a more generic blacklist pattern.
+insert_if_absent() {
file=$1
str=$2
test -f $file || touch $file
- echo "$str" | sort_patterns - $file | cmp -s - $file > /dev/null \
- || { echo "$str" | sort_patterns - $file > $file.bak \
- && mv $file.bak $file; } \
- || die "insert_sorted_if_absent $file $str: failed"
+ test -r $file || die "Error: failed to read ignore file: $file"
+ duplicate_entries=$(gitignore_entries $file | sort | uniq -d)
+ if [ "$duplicate_entries" ] ; then
+ die "Error: Duplicate entries in $file: " $duplicate_entries
+ fi
+ linesold=$(gitignore_entries $file | wc -l)
+ linesnew=$(echo "$str" | gitignore_entries - $file | sort -u | wc -l)
+ if [ $linesold != $linesnew ] ; then
+ { echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
+ || die "insert_if_absent $file $str: failed"
+ fi
}
# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
-# insert_sorted_if_absent.
+# insert_if_absent.
insert_vc_ignore() {
vc_ignore_file="$1"
pattern="$2"
@@ -344,7 +344,7 @@ insert_vc_ignore() {
# .gitignore entry.
pattern=$(echo "$pattern" | sed s,^,/,);;
esac
- insert_sorted_if_absent "$vc_ignore_file" "$pattern"
+ insert_if_absent "$vc_ignore_file" "$pattern"
}
# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
@@ -889,20 +889,21 @@ find "$m4_base" "$source_base" \
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
-type l -xtype l -delete > /dev/null 2>&1
+# Invoke autoreconf with --force --install to ensure upgrades of tools
+# such as ylwrap.
+AUTORECONFFLAGS="--verbose --install --force -I $m4_base $ACLOCAL_FLAGS"
+
# Some systems (RHEL 5) are using ancient autotools, for which the
# --no-recursive option had not been invented. Detect that lack and
# omit the option when it's not supported. FIXME in 2017: remove this
# hack when RHEL 5 autotools are updated, or when they become irrelevant.
-no_recursive=
case $($AUTORECONF --help) in
- *--no-recursive*) no_recursive=--no-recursive;;
+ *--no-recursive*) AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive";;
esac
# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
-echo "running: AUTOPOINT=true LIBTOOLIZE=true " \
- "$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS"
-AUTOPOINT=true LIBTOOLIZE=true \
- $AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \
+echo "running: AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS"
+AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS \
|| die "autoreconf failed"
# Get some extra files from gnulib, overriding existing files.
diff --git a/gl/lib/regex_internal.c.diff b/gl/lib/regex_internal.c.diff
index 2cede3c..40b0f55 100644
--- a/gl/lib/regex_internal.c.diff
+++ b/gl/lib/regex_internal.c.diff
@@ -2,7 +2,7 @@ diff --git a/lib/regex_internal.c b/lib/regex_internal.c
index 904b88e..61c8d9d 100644
--- a/lib/regex_internal.c
+++ b/lib/regex_internal.c
-@@ -18,6 +18,8 @@
+@@ -17,6 +17,8 @@
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
@@ -11,7 +11,7 @@ index 904b88e..61c8d9d 100644
static void re_string_construct_common (const char *str, Idx len,
re_string_t *pstr,
RE_TRANSLATE_TYPE trans, bool icase,
-@@ -1390,7 +1392,10 @@ static void
+@@ -1394,7 +1396,10 @@ static void
internal_function
re_node_set_remove_at (re_node_set *set, Idx idx)
{
diff --git a/gl/lib/regex_internal.h.diff b/gl/lib/regex_internal.h.diff
deleted file mode 100644
index d1506a6..0000000
--- a/gl/lib/regex_internal.h.diff
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git i/lib/regex_internal.h w/lib/regex_internal.h
-index 859832f..3c7fe06 100644
---- i/lib/regex_internal.h
-+++ w/lib/regex_internal.h
-@@ -826,7 +826,8 @@ re_string_wchar_at (const re_string_t *pstr, Idx idx)
-
- static int
- internal_function __attribute ((pure))
--re_string_elem_size_at (const re_string_t *pstr, Idx idx)
-+re_string_elem_size_at (const re_string_t *pstr _UNUSED_PARAMETER_,
-+ Idx idx _UNUSED_PARAMETER_)
- {
- # ifdef _LIBC
- const unsigned char *p, *extra;
diff --git a/gnulib b/gnulib
-Subproject f782c0f66728e636e98214c33e55de063f00f11
+Subproject db9cad7b8b59a010ff9158513a29cb002a2b8ae