#
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING. If not, write to
-# the Free Software Foundation, 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
#
########################################################################
fi
done
- # Update `gcc/version.c'.
- for x in gcc/version.c; do
- y=`basename ${x}`
- (changedir `dirname ${SOURCE_DIRECTORY}/${x}` && \
- sed -e 's|version_string\[\] = \".*\"|version_string\[\] = \"'${RELEASE}'\"|g' < ${y} > ${y}.new && \
- mv ${y}.new ${y} && \
- ${CVS} ci -m 'Update version' ${y}) || \
- error "Could not update ${x}"
- done
+ # Update gcc/DEV-PHASE if it exists, otherwise gcc/version.c.
+
+ if [ -f ${SOURCE_DIRECTORY}/gcc/DEV-PHASE ]; then
+ [ `cat ${SOURCE_DIRECTORY}/gcc/BASE-VER` = ${RELEASE} ] || \
+ error "Release number ${RELEASE} does not match BASE-VER"
+ (changedir ${SOURCE_DIRECTORY}/gcc && \
+ : > DEV-PHASE && \
+ ${CVS} ci -m 'Mark as release' DEV-PHASE) || \
+ error "Could not update DEV-PHASE"
+ else
+ for x in gcc/version.c; do
+ y=`basename ${x}`
+ (changedir `dirname ${SOURCE_DIRECTORY}/${x}` && \
+ sed -e 's|version_string\[\] = \".*\"|version_string\[\] = \"'${RELEASE}'\"|g' < ${y} > ${y}.new && \
+ mv ${y}.new ${y} && \
+ ${CVS} ci -m 'Update version' ${y}) || \
+ error "Could not update ${x}"
+ done
+ fi
# Make sure we tag the sources for a final release.
TAG="gcc_`echo ${RELEASE} | tr . _`_release"
EXPORTDATE=""
if [ -n "${TAG}" ]; then
inform "Tagging sources as ${TAG}"
- # The -F option to CVS is intentionally not used below. If you
- # need to retry a release, you will have to manually remove any
- # existing tag.
+ EXPORTTAG="-r${TAG}"
+ # Try to check out a file using ${TAG}. If the command succeeds,
+ # then the sources have already been tagged. We don't want to
+ # overwrite an existing tag, so we don't want to use the "-F"
+ # option to "cvs rtag" below. So, if the tag already exists,
+ # issue an error message; the release manager can manually remove
+ # the tag if appropriate.
+ if ${CVS} export -d "`basename ${SOURCE_DIRECTORY}`" \
+ "${EXPORTTAG}" gcc/ChangeLog; then
+ error "Tag ${TAG} already exists"
+ fi
${CVS} rtag -r ${CVSBRANCH} ${TAG} gcc || \
error "Could not tag sources"
- EXPORTTAG="-r${TAG}"
else
if [ ${CVSBRANCH} != "HEAD" ]; then
EXPORTTAG="-r${CVSBRANCH}"