bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] bootstrap: add bootstrap_sync option.


From: Joel E. Denny
Subject: [PATCH] bootstrap: add bootstrap_sync option.
Date: Sun, 17 Oct 2010 12:27:54 -0400 (EDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

Hi,

Now that Bison's bootstrap is in sync with gnulib's, I'd like to make sure 
we keep it that way.  This patch will help.  Ok to push?

>From 8b8690c8758371880c85e2186b5491de1bc307b2 Mon Sep 17 00:00:00 2001
From: Joel E. Denny <address@hidden>
Date: Sun, 17 Oct 2010 11:54:21 -0400
Subject: [PATCH] bootstrap: add bootstrap_sync option.

* build-aux/bootstrap: Accept --bootstrap-sync to cause
bootstrap to fail if it is not identical to the local gnulib's
bootstrap.  Accept bootstrap_sync=true in bootstrap.conf to
enable this by default.  Accept --no-bootstrap-sync to disable
it.
---
 ChangeLog           |    9 +++++++++
 build-aux/bootstrap |   20 ++++++++++++++++++++
 2 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ae5d49a..559e708 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-10-17  Joel E. Denny  <address@hidden>
+
+       bootstrap: add bootstrap_sync option.
+       * build-aux/bootstrap: Accept --bootstrap-sync to cause
+       bootstrap to fail if it is not identical to the local gnulib's
+       bootstrap.  Accept bootstrap_sync=true in bootstrap.conf to
+       enable this by default.  Accept --no-bootstrap-sync to disable
+       it.
+
 2010-10-17  Bruno Haible  <address@hidden>
 
        Make use of GCC's attribute __alloc_size__.
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 8c8d777..a2a2f29 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -54,6 +54,9 @@ Options:
                           have gnulib sources on your machine, and
                           do not want to waste your bandwidth downloading
                           them again.  Defaults to \$GNULIB_SRCDIR.
+ --bootstrap-sync         Fail if this bootstrap script is not identical
+                          to the version in the local gnulib sources.
+ --no-bootstrap-sync      Do not fail if bootstrap is out of sync.
  --copy                   Copy files instead of creating symbolic links.
  --force                  Attempt to bootstrap even if the sources seem
                           not to have been checked out.
@@ -168,6 +171,10 @@ copy=false
 # on which version control system (if any) is used in the source directory.
 vc_ignore=auto
 
+# Set this to true in bootstrap.conf to enable --bootstrap-sync by
+# default.
+bootstrap_sync=false
+
 # find_tool ENVVAR NAMES...
 # -------------------------
 # Search for a required program.  Use the value of ENVVAR, if set,
@@ -239,6 +246,10 @@ do
     checkout_only_file=;;
   --copy)
     copy=true;;
+  --bootstrap-sync)
+    bootstrap_sync=true;;
+  --no-bootstrap-sync)
+    bootstrap_sync=false;;
   *)
     echo >&2 "$0: $option: unknown option"
     exit 1;;
@@ -500,6 +511,15 @@ case ${GNULIB_SRCDIR--} in
   ;;
 esac
 
+if $bootstrap_sync; then
+  diff -u $0 $GNULIB_SRCDIR/build-aux/bootstrap >&2
+  if test $? -ne 0; then
+    echo "" >&2
+    echo "Error: bootstrap is out of sync with gnulib." >&2
+    exit 1
+  fi
+fi
+
 gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
 <$gnulib_tool || exit
 
-- 
1.7.0.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]