OSDN Git Service

Add rune as an alias for int.
[pf3gnuchains/gcc-fork.git] / contrib / gcc_update
index 8192d81..c719502 100755 (executable)
@@ -4,8 +4,8 @@
 # repository, with an emphasis on treating generated files correctly, so
 # that autoconf, gperf et al are not required for the ``end'' user.
 #
-# (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
-# Free Software Foundation
+# (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
+# 2011 Free Software Foundation
 # Originally by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>, August 1998.
 #
 # This script is Free Software, and it can be copied, distributed and
@@ -80,6 +80,14 @@ gcc/cstamp-h.in: gcc/configure.ac
 gcc/config.in: gcc/cstamp-h.in
 gcc/fixinc/fixincl.x: gcc/fixinc/fixincl.tpl gcc/fixinc/inclhack.def
 gcc/config/arm/arm-tune.md: gcc/config/arm/arm-cores.def gcc/config/arm/gentune.sh
+gcc/config/arm/arm-tables.opt: gcc/config/arm/arm-arches.def gcc/config/arm/arm-cores.def gcc/config/arm/arm-fpus.def gcc/config/arm/genopt.sh
+gcc/config/avr/avr-tables.opt: gcc/config/avr/avr-mcus.def gcc/config/avr/genopt.sh
+gcc/config/c6x/c6x-tables.opt: gcc/config/c6x/c6x-isas.def gcc/config/c6x/genopt.sh
+gcc/config/c6x/c6x-sched.md: gcc/config/c6x/c6x-sched.md.in gcc/config/c6x/gensched.sh
+gcc/config/c6x/c6x-mult.md: gcc/config/c6x/c6x-mult.md.in gcc/config/c6x/genmult.sh
+gcc/config/m68k/m68k-tables.opt: gcc/config/m68k/m68k-devices.def gcc/config/m68k/m68k-isas.def gcc/config/m68k/m68k-microarchs.def gcc/config/m68k/genopt.sh
+gcc/config/mips/mips-tables.opt: gcc/config/mips/mips-cpus.def gcc/config/mips/genopt.sh
+gcc/config/rs6000/rs6000-tables.opt: gcc/config/rs6000/rs6000-cpus.def gcc/config/rs6000/genopt.sh
 # And then, language-specific files
 gcc/cp/cfns.h: gcc/cp/cfns.gperf
 gcc/java/keyword.h: gcc/java/keyword.gperf
@@ -311,24 +319,34 @@ case $vcs_type in
        # Update tree, but make sure to only pull the default branch.
        # Otherwise all branches in the upstream repo are added, even if
        # only a single one has been cloned.
-       $GCC_HG pull -u ${silent+-q} -r`$GCC_HG branch` ${1+"$@"}
+       $GCC_HG pull ${silent+-q} -r`$GCC_HG branch` ${1+"$@"}
        if [ $? -ne 0 ]; then
             (touch_files_reexec)
             echo "hg pull of full tree failed." >&2
             exit 1
        fi
 
-       # Extract SVN revision corresponding to tip, as stored by hg convert.
-       # Before hg 1.4.3, there's no template keyword corresponding to the
-       # extra: tag, so need to use hg log --debug to extract the info.
-       revision=`$GCC_HG log --debug -l1 | \
+       # Update tree.  Needs to be done separately from pull so
+       # gcc_update -rREV works.
+       $GCC_HG update ${silent+-q} ${1+"$@"}
+       if [ $? -ne 0 ]; then
+            (touch_files_reexec)
+            echo "hg update of full tree failed." >&2
+            exit 1
+       fi
+
+       # Extract SVN revision corresponding to parents, as stored by
+       # hg convert.  Before hg 1.4.3, there's no template keyword
+       # corresponding to the extra: tag, so need to use hg log --debug
+       # to extract the info.
+       parents=`$GCC_HG parents --template '{rev}'`
+       convert_revision=`$GCC_HG log --debug -r$parents | \
            sed -ne "/^extra:.*convert_revision=svn:/ {
-               s%^.*@%%
+               s%^[^/]*/%%
                p
            }"`
-       branch=`$GCC_HG branch`
-       # trunk in SVN parlance shows up as default branch in hg.
-       [ x$branch = x"default" ] && branch="trunk"
+       revision=`echo $convert_revision | sed -e 's/.*@//'`
+       branch=`echo $convert_revision | sed -e 's%branches/%%' -e 's/@.*//'`
        ;;
 
     svn)