This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Re: RFD: maintainer-scripts/update_version also doing libstdc++-v3


Last week, I wrote:
> We'd like the version/datestamp defined in v3's c++config to also be
> regularly updated.  But the pattern searched for in update_version requires
> the version be inside a character string.
> 
> libstdc++ uses a #define instead, which doesn't match that pattern.
[...]
> The same thing will have to be done to update_branch_version.  (Or I
> can remove that script and make update_version take command-line options
> instead.)

This makes update_version more general:  arguments can be passed on
during checkout (obviating the need for a separate-but-almost-identical
update_branch_version), and files which #define a version stamp instead
of using a char* can also be incremented.

Unlike the previous one, this patch /is/ for approval.  :-)  It doesn't
affect gcc sources directly, and I've tested it locally with a mirror of
the repository itself.


2001-05-29  Phil Edwards  <pme@sources.redhat.com>

	* update_version:  Accept command-line arguments to be passed to
	the checkout command.  Change libstdc++-v3's version also.
	* update_branch_version:  Remove.
	* crontab:  Update.


Index: crontab
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/maintainer-scripts/crontab,v
retrieving revision 1.2
diff -u -3 -p -r1.2 crontab
--- crontab	2001/03/19 01:40:04	1.2
+++ crontab	2001/05/29 20:51:28
@@ -1,4 +1,4 @@
 16 0 * * * sh /home/gccadmin/scripts/update_version
-16 0 * * * sh /home/gccadmin/scripts/update_branch_version
+16 0 * * * sh /home/gccadmin/scripts/update_version -rgcc-3_0-branch
 50 0 * * * sh /home/gccadmin/scripts/update_web_docs
 55 0 * * * sh /home/gccadmin/scripts/update_web_docs_libstdcxx
Index: update_version
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/maintainer-scripts/update_version,v
retrieving revision 1.2
diff -u -3 -p -r1.2 update_version
--- update_version	2001/03/18 00:08:56	1.2
+++ update_version	2001/05/29 20:50:46
@@ -7,20 +7,35 @@ export CVSROOT
 /bin/mkdir /tmp/$$
 cd /tmp/$$
 
+# ARGS is passed to 'cvs co'
+ARGS="$*"
 CURR_DATE=`/bin/date +"%Y%m%d"`
 
-FILES="gcc/gcc/version.c gcc/gcc/f/version.c gcc/libf2c/libF77/Version.c gcc/libf2c/libI77/Version.c gcc/libf2c/libU77/Version.c"
+# version is contained within a char*
+textstring_FILES="gcc/gcc/version.c gcc/gcc/f/version.c gcc/libf2c/libF77/Version.c gcc/libf2c/libI77/Version.c gcc/libf2c/libU77/Version.c"
 
-/usr/local/bin/cvs co $FILES
+# version is contained within a #define
+cppdefine_FILES="gcc/libstdc++-v3/include/bits/c++config"
 
-for file in $FILES; do
+/usr/local/bin/cvs co $ARGS $textstring_FILES $cppdefine_FILES
 
+for file in $textstring_FILES; do
   OLD_VERSION=`/bin/cat $file`
   /bin/sed -e "s/\(.*\"[^ ]*\) [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/\1 ${CURR_DATE}/" >${file} <<HERE
 $OLD_VERSION
 HERE
 done
 
-/usr/local/bin/cvs commit -m "Daily bump." $FILES
+for file in $cppdefine_FILES; do
+  OLD_VERSION=`/bin/cat $file`
+  /bin/sed -e "s/\(#.*\) [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/\1 ${CURR_DATE}/" >${file} <<HERE
+$OLD_VERSION
+HERE
+done
+
+/usr/local/bin/cvs commit -m "Daily bump." $textstring_FILES $cppdefine_FILES
+commit_results=$?
 
 /bin/rm -rf /tmp/$$
+exit $commit_results
+


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]