X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=contrib%2Fgcc_build;h=6713066d7ce89f799b3b4d923afcfc4f15c6b7c0;hb=eae8f2a14c24c0beb551cebc1f35babba10ce1a4;hp=f0e79266595f39c32badeff8b3c6a159ba688f44;hpb=a1ed82f10d215a02c60f3f78fb2e97e9f4d09a38;p=pf3gnuchains%2Fgcc-fork.git diff --git a/contrib/gcc_build b/contrib/gcc_build index f0e79266595..6713066d7ce 100755 --- a/contrib/gcc_build +++ b/contrib/gcc_build @@ -17,7 +17,7 @@ # # GCC is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) +# the Free Software Foundation; either version 3, or (at your option) # any later version. # # GCC is distributed in the hope that it will be useful, @@ -62,6 +62,7 @@ gcc_build [-c configure_options] [-d destination_directory] [-m make_boot_options] [-o objdir] + [-b branch_name] [-u username] [-p protocol] [-t tarfile] @@ -94,7 +95,7 @@ checkout_gcc() { # Checkout the tree test -n "${SVN_USERNAME}" && SVN_USERNAME="${SVN_USERNAME}@" - SVNROOT="${SVN_PROTOCOL}://${SVN_USERNAME}${SVN_SERVER}${SVN_REPOSITORY}" + SVNROOT="${SVN_PROTOCOL}://${SVN_USERNAME}${SVN_SERVER}${SVN_REPOSITORY}${SVN_BRANCH}" $GCC_SVN co $SVNROOT ${DESTINATION} || \ error "Could not check out GCC" @@ -111,7 +112,7 @@ update_gcc() { changedir ${DESTINATION} # Update the tree - ./contrib/gcc_update -d || \ + ./contrib/gcc_update || \ error "Could not update GCC" } @@ -196,9 +197,12 @@ install_gcc() { # SVN command GCC_SVN=${GCC_SVN-${SVN-svn}} # The SVN server containing the GCC repository. -SVN_SERVER="dberlin.org" +SVN_SERVER="gcc.gnu.org" # The path to the repository on that server. -SVN_REPOSITORY="/trunk" +SVN_REPOSITORY="/svn/gcc/" +# The branch to check out from that server. +# Defaults to trunk if no branch is defined with -b. +SVN_BRANCH="" # The SVN protocol to use. SVN_PROTOCOL="svn" # The username to use when connecting to the server. @@ -240,7 +244,7 @@ UPDATE=0 test $# -eq 0 && usage # Parse the options. -while getopts "c:d:m:o:p:t:u:x:" ARG; do +while getopts "c:d:m:o:p:t:b:u:x:" ARG; do case $ARG in c) CONFIGURE_OPTIONS="${OPTARG}";; d) DESTINATION="${OPTARG}";; @@ -249,6 +253,7 @@ while getopts "c:d:m:o:p:t:u:x:" ARG; do p) SVN_PROTOCOL="${OPTARG}";; t) TARFILE="${OPTARG}";; x) MAKE_CHECK_OPTIONS="${OPTARG}";; + b) SVN_BRANCH="${OPTARG}";; u) SVN_USERNAME="${OPTARG}";; \?) usage;; esac @@ -276,6 +281,17 @@ if [ ${CHECKOUT} -ne 0 ] && [ ${UPDATE} -ne 0 ]; then error "Cannot checkout and update simultaneously" fi +if [ ${CHECKOUT} -eq 0 ] && test -n "${SVN_BRANCH}"; then + error "Branch argument only makes sense when doing a checkout" +fi + +# Validate the branch name. +if test -n "${SVN_BRANCH}"; then + SVN_BRANCH="branches/${SVN_BRANCH}"; +else + SVN_BRANCH="trunk"; +fi + # Checkout the tree. if [ ${CHECKOUT} -ne 0 ]; then checkout_gcc