From b69cd3cfcf7b4ab21f8e4cd1250565667dc0a771 Mon Sep 17 00:00:00 2001
From: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Date: Tue, 1 Jul 2003 18:04:42 +0200
Subject: [PATCH] gcc_release (BRANCH): Rename to...

	* gcc_release (BRANCH): Rename to...
	(CVSBRANCH): ...new macro, and use BRANCH for the variant users
	will see.
	(FTP_BRANCH): For snapshots, include ${BRANCH} in the last part
	of the directory name.
	Use .snapshot_date-${BRANCH} instead of .snapshot_date.

From-SVN: r68777
---
 maintainer-scripts/ChangeLog   |  9 +++++++++
 maintainer-scripts/gcc_release | 26 ++++++++++++++++----------
 2 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog
index da518ab140eb..30253f69ed38 100644
--- a/maintainer-scripts/ChangeLog
+++ b/maintainer-scripts/ChangeLog
@@ -1,3 +1,12 @@
+2003-07-01  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
+
+	* gcc_release (BRANCH): Rename to...
+	(CVSBRANCH): ...new macro, and use BRANCH for the variant users
+	will see.
+	(FTP_BRANCH): For snapshots, include ${BRANCH} in the last part
+	of the directory name.
+	Use .snapshot_date-${BRANCH} instead of .snapshot_date.
+
 2003-06-28  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
 
 	* gcc_release: Command "all" now creates .gz files only for
diff --git a/maintainer-scripts/gcc_release b/maintainer-scripts/gcc_release
index 5e0b3612a275..41fbfa98afb4 100755
--- a/maintainer-scripts/gcc_release
+++ b/maintainer-scripts/gcc_release
@@ -119,7 +119,7 @@ build_sources() {
     inform "Updating ChangeLogs and version files"
 
     ${CVS} co -d "`basename ${SOURCE_DIRECTORY}`" \
-           -r ${BRANCH} gcc || \
+           -r ${CVSBRANCH} gcc || \
            error "Could not check out release sources"
     for x in `find ${SOURCE_DIRECTORY} -name ChangeLog`; do
       # Update this ChangeLog file only if it does not yet contain the
@@ -159,16 +159,16 @@ EOF
   # Tag the sources.
   if [ -n "${TAG}" ]; then
     inform "Tagging release sources"
-    ${CVS} rtag -r ${BRANCH} -F ${TAG} gcc || \
+    ${CVS} rtag -r ${CVSBRANCH} -F ${TAG} gcc || \
       error "Could not tag release sources"
-    BRANCH=$TAG
+    CVSBRANCH=$TAG
   fi
 
   # Export the current sources.
   inform "Retrieving release sources"
   ${CVS} \
        export -d "`basename ${SOURCE_DIRECTORY}`" \
-       -r ${BRANCH} gcc || \
+       -r ${CVSBRANCH} gcc || \
     error "Could not retrieve release sources"
 
   # Run gcc_update on them to set up the timestamps nicely.
@@ -431,9 +431,14 @@ RELEASE_REVISION=""
 # The complete name of the release.
 RELEASE=""
 
-# The name of the branch from which the release should be made.
+# The name of the branch from which the release should be made, in a 
+# user-friendly form.
 BRANCH=""
 
+# The name of the branch from which the release should be made, as used
+# for our version control system.
+CVSBRANCH=""
+
 # The tag to apply to the sources used for the release.
 TAG=""
 
@@ -547,7 +552,7 @@ if [ $SNAPSHOT -eq 0 ]; then
 
   # Compute the name of the branch, which is based solely on the major
   # and minor release numbers.
-  BRANCH="gcc-${RELEASE_MAJOR}_${RELEASE_MINOR}-branch"
+  CVSBRANCH="gcc-${RELEASE_MAJOR}_${RELEASE_MINOR}-branch"
 
   # If this is not a final release, set various parameters acordingly.
   if [ ${FINAL} -ne 1 ]; then
@@ -559,14 +564,15 @@ if [ $SNAPSHOT -eq 0 ]; then
 else
   RELEASE=$DATE
   # For now snapshots come from the 3.3 branch.
-  BRANCH=gcc-3_3-branch
-  FTP_PATH="${FTP_PATH}/snapshots/${LONG_DATE}"
+  BRANCH="3.3"
+  CVSBRANCH=gcc-3_3-branch
+  FTP_PATH="${FTP_PATH}/snapshots/${BRANCH}-${LONG_DATE}"
   TAG=gcc_ss_${DATE}
 
   # Building locally on gcc.gnu.org, we know what the last snapshot date
   # was.
   if [ $LOCAL -ne 0 ]; then
-    LAST_DATE=`cat ~/.snapshot_date`
+    LAST_DATE=`cat ~/.snapshot_date-${BRANCH}`
     LAST_LONG_DATE=`date --date=$LAST_DATE +%Y-%m-%d`
     LAST_DIR=~ftp/pub/gcc/snapshots/${LAST_LONG_DATE}
     OLD_TARS=${LAST_DIR}/gcc-${LAST_DATE}.tar.bz2
@@ -661,7 +667,7 @@ if [ $MODE_UPLOAD -ne 0 ]; then
 
     # Update snapshot date file.
     changedir ~
-    echo $DATE >.snapshot_date
+    echo $DATE > .snapshot_date-${BRANCH}
 
     # Remove working directory
     rm -rf ${WORKING_DIRECTORY}
-- 
GitLab