X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/d7be40857659eb85f3e9926cc94c08bf1d94929e..812775a0391e122eff1983afea2da96c600c7307:/bootstrap diff --git a/bootstrap b/bootstrap index e0ac7c75..4b0abfa6 100755 --- a/bootstrap +++ b/bootstrap @@ -2,7 +2,8 @@ # Bootstrap this package from checked-out sources. -# Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# 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 @@ -35,7 +36,7 @@ bt_regex=`echo "$bt"| sed 's/\./[.]/g'` bt2=${bt}2 usage() { - echo >&2 "\ + cat </dev/null 2>/dev/null ; then + if git config merge.merge-changelog.driver >/dev/null ; then + : + elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then + echo "initializing git-merge-changelog driver" + git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver' + git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B' + else + echo "consider installing git-merge-changelog from gnulib" + fi +fi + # Get gnulib files. case ${GNULIB_SRCDIR--} in @@ -274,7 +304,7 @@ case ${GNULIB_SRCDIR--} in trap cleanup_gnulib 1 2 13 15 - cvs -z3 -q -d ${CVS_PREFIX}cvs.savannah.gnu.org:/cvsroot/gnulib co gnulib || + cvs -z3 -q -d ${CVS_PREFIX}pserver.git.sv.gnu.org:/gnulib.git co -d gnulib HEAD || cleanup_gnulib trap - 1 2 13 15 @@ -333,6 +363,27 @@ case $SKIP_PO in fi;; esac +check_dst_dir() +{ + dst=$1 + # If the destination directory doesn't exist, create it. + # This is required at least for "lib/uniwidth/cjk.h". + dst_dir=`dirname "$dst"` + if ! test -d "$dst_dir"; then + mkdir -p "$dst_dir" + + # If we've just created a directory like lib/uniwidth, + # tell version control system(s) it's ignorable. + # FIXME: for now, this does only one level + parent=`dirname "$dst_dir"` + for dot_ig in x $vc_ignore; do + test $dot_ig = x && continue + ig=$parent/$dot_ig + insert_vc_ignore $ig `echo "$dst_dir"|sed 's,.*/,,'` + done + fi +} + symlink_to_dir() { src=$1/$2 @@ -340,22 +391,7 @@ symlink_to_dir() test -f "$src" && { - # If the destination directory doesn't exist, create it. - # This is required at least for "lib/uniwidth/cjk.h". - dst_dir=`dirname "$dst"` - if ! test -d "$dst_dir"; then - mkdir -p "$dst_dir" - - # If we've just created a directory like lib/uniwidth, - # tell version control system(s) it's ignorable. - # FIXME: for now, this does only one level - parent=`dirname "$dst_dir"` - for dot_ig in x $vc_ignore; do - test $dot_ig = x && continue - ig=$parent/$dot_ig - insert_sorted_if_absent $ig `echo "$dst_dir"|sed 's,.*/,,'` - done - fi + check_dst_dir "$dst" if $copy; then { @@ -419,6 +455,7 @@ cp_mark_as_generated() sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst" } else + check_dst_dir "$cp_dst" # Copy the file first to get proper permissions if it # doesn't already exist. Then overwrite the copy. cp "$cp_src" "$cp_dst-t" && @@ -499,18 +536,18 @@ slurp() { test $dot_ig = x && continue ig=$dir/$dot_ig if test -n "$copied"; then - insert_sorted_if_absent $ig "$copied" + insert_vc_ignore $ig "$copied" # If an ignored file name ends with _.h, then also add # the name with just ".h". Many gnulib headers are generated, # e.g., stdint_.h -> stdint.h, dirent_.h ->..., etc. # Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed f=`echo "$copied"|sed 's/_\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'` - insert_sorted_if_absent $ig "$f" + insert_vc_ignore $ig "$f" # For files like sys_stat_.h and sys_time_.h, record as # ignorable the directory we might eventually create: sys/. f=`echo "$copied"|sed 's/sys_.*_\.h$/sys/'` - insert_sorted_if_absent $ig "$f" + insert_vc_ignore $ig "$f" fi done done