]> git.saurik.com Git - bison.git/commitdiff
* bootstrap: Sync from coreutils, as follows:
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 13 Oct 2006 04:37:19 +0000 (04:37 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 13 Oct 2006 04:37:19 +0000 (04:37 +0000)
2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>

* bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
variable was sometimes used without being initialized.  This
messed up the installation of the INSTALL file in some cases.

2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>

* bootstrap (usage, main program, symlink_to_gnulib): Add option
--copy.  Inspired by a suggestion from Bruno Haible.

2006-10-03  Jim Meyering  <jim@meyering.net>

* bootstrap: Undo last change to this file, since now gnulib-tool
sticks with the automake default in generating dependencies.

ChangeLog
bootstrap

index 30f44797b99ce3958f6ceaa7fc57b8160db281a0..4eeb51f41e66793e63df8d5ecb2985ba263b5332 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * bootstrap: Sync from coreutils, as follows:
+
+       2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
+       variable was sometimes used without being initialized.  This
+       messed up the installation of the INSTALL file in some cases.
+
+       2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * bootstrap (usage, main program, symlink_to_gnulib): Add option
+       --copy.  Inspired by a suggestion from Bruno Haible.
+
+       2006-10-03  Jim Meyering  <jim@meyering.net>
+
+       * bootstrap: Undo last change to this file, since now gnulib-tool
+       sticks with the automake default in generating dependencies.
+
 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
 
        * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
 
        * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
 
 2006-10-11  Bob Rossi  <bob@brasko.net>
 
 
 2006-10-11  Bob Rossi  <bob@brasko.net>
 
-        * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
-        yymsg_alloc fields.
-        (yypvarsinit, yypushparse): Remove init of removed fields.
-        (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
+       * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
+       yymsg_alloc fields.
+       (yypvarsinit, yypushparse): Remove init of removed fields.
+       (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
 
 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
 
 
 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
 
index d357ee46966e95629846d5f448ef9ca02fc23453..21f2e0eb5e91fd0c3ee6adbb53dd87a41de0e4eb 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -40,6 +40,7 @@ Options:
                           have gnulib sources on your machine, and
                           do not want to waste your bandwidth dowloading
                           them again.
                           have gnulib sources on your machine, and
                           do not want to waste your bandwidth dowloading
                           them again.
+ --copy                   Copy files instead of creating symbolic links.
  --force                  Bootstrap even if the sources didn't come from CVS.
  --skip-po                Do not download po files.
  --cvs-user=USERNAME      Set the CVS username to be used when accessing
  --force                  Bootstrap even if the sources didn't come from CVS.
  --skip-po                Do not download po files.
  --cvs-user=USERNAME      Set the CVS username to be used when accessing
@@ -112,6 +113,9 @@ excluded_files=
 # the distributed version.
 CVS_only_file=CVS
 
 # the distributed version.
 CVS_only_file=CVS
 
+# Whether to use copies instead of symlinks.
+copy=false
+
 # Override the default configuration, if necessary.
 test -r bootstrap.conf && . ./bootstrap.conf
 
 # Override the default configuration, if necessary.
 test -r bootstrap.conf && . ./bootstrap.conf
 
@@ -133,6 +137,8 @@ do
     SKIP_PO=t;;
   --force)
     CVS_only_file=;;
     SKIP_PO=t;;
   --force)
     CVS_only_file=;;
+  --copy)
+    copy=true;;
   *)
     echo >&2 "$0: $option: unknown option"
     exit 1;;
   *)
     echo >&2 "$0: $option: unknown option"
     exit 1;;
@@ -249,29 +255,43 @@ symlink_to_gnulib()
 {
   src=$GNULIB_SRCDIR/$1
   dst=${2-$1}
 {
   src=$GNULIB_SRCDIR/$1
   dst=${2-$1}
-  dot_dots=
-
-  case $src in
-  /*) ;;
-  *)
-    case /$dst/ in
-    *//* | */../* | */./* | /*/*/*/*/*/)
-       echo >&2 "$0: invalid symlink calculation: $src -> $dst"
-       exit 1;;
-    /*/*/*/*/) dot_dots=../../../;;
-    /*/*/*/)   dot_dots=../../;;
-    /*/*/)     dot_dots=../;;
-    esac;;
-  esac
 
   test -f "$src" && {
 
   test -f "$src" && {
-    test -h "$dst" &&
-    src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 &&
-    dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 &&
-    test "$src_i" = "$dst_i" || {
-      echo "$0: ln -fs $dot_dots$src $dst" &&
-      ln -fs "$dot_dots$src" "$dst"
-    }
+    if $copy; then
+      {
+       test ! -h "$dst" || {
+         echo "$0: rm -f $dst" &&
+         rm -f "$dst"
+       }
+      } &&
+      test -f "$dst" &&
+      cmp -s "$src" "$dst" || {
+       echo "$0: cp -fp $src $dst" &&
+       cp -fp "$src" "$dst"
+      }
+    else
+      test -h "$dst" &&
+      src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 &&
+      dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 &&
+      test "$src_i" = "$dst_i" || {
+       dot_dots=
+       case $src in
+       /*) ;;
+       *)
+         case /$dst/ in
+         *//* | */../* | */./* | /*/*/*/*/*/)
+            echo >&2 "$0: invalid symlink calculation: $src -> $dst"
+            exit 1;;
+         /*/*/*/*/)    dot_dots=../../../;;
+         /*/*/*/)      dot_dots=../../;;
+         /*/*/)        dot_dots=../;;
+         esac;;
+       esac
+
+       echo "$0: ln -fs $dot_dots$src $dst" &&
+       ln -fs "$dot_dots$src" "$dst"
+      }
+    fi
   }
 }
 
   }
 }
 
@@ -326,13 +346,10 @@ slurp() {
       if test $file = Makefile.am; then
         copied=$copied${sep}gnulib.mk; sep=$nl
        remove_intl='/^[^#].*\/intl/s/^/#/'
       if test $file = Makefile.am; then
         copied=$copied${sep}gnulib.mk; sep=$nl
        remove_intl='/^[^#].*\/intl/s/^/#/'
-       no_dep=no-dependencies
-       remove_no_dep="/^AUTOMAKE_OPTIONS =.* $no_dep/s/ $no_dep//"
-       sed_xform="$remove_intl;$remove_no_dep"
-        sed "$sed_xform" $1/$dir/$file | cmp -s - $dir/gnulib.mk || {
+        sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/gnulib.mk || {
          echo "$0: Copying $1/$dir/$file to $dir/gnulib.mk ..." &&
          rm -f $dir/gnulib.mk &&
          echo "$0: Copying $1/$dir/$file to $dir/gnulib.mk ..." &&
          rm -f $dir/gnulib.mk &&
-         sed "$sed_xform" $1/$dir/$file >$dir/gnulib.mk
+         sed "$remove_intl" $1/$dir/$file >$dir/gnulib.mk
        }
       elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
           grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
        }
       elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
           grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |