Update of /cvsroot/boost/boost/tools/jam/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1039/tools/jam/src
Modified Files:
boost-jam.spec build.jam bump_version.py patchlevel.h
Log Message:
Rewrite version bump script to not have external dependencies. Bump to bjam to
3.1.13.
Index: boost-jam.spec
===================================================================
RCS file: /cvsroot/boost/boost/tools/jam/src/boost-jam.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- boost-jam.spec 12 Feb 2006 20:59:42 -0000 1.23
+++ boost-jam.spec 6 Jun 2006 20:42:08 -0000 1.24
@@ -1,5 +1,5 @@
Name: boost-jam
-Version: 3.1.12
+Version: 3.1.13
Summary: Build tool
Release: 1
Source: %{name}-%{version}.tgz
Index: build.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/jam/src/build.jam,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- build.jam 4 Apr 2006 23:17:43 -0000 1.81
+++ build.jam 6 Jun 2006 20:42:08 -0000 1.82
@@ -12,7 +12,7 @@
else { . = "." ; }
# Info about what we are building.
-_VERSION_ = 3 1 12 ;
+_VERSION_ = 3 1 13 ;
NAME = boost-jam ;
VERSION = $(_VERSION_:J=$(.)) ;
RELEASE = 1 ;
Index: bump_version.py
===================================================================
RCS file: /cvsroot/boost/boost/tools/jam/src/bump_version.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- bump_version.py 10 Dec 2003 07:49:14 -0000 1.1
+++ bump_version.py 6 Jun 2006 20:42:08 -0000 1.2
@@ -7,49 +7,74 @@
# and updates all necessary files. For the time being, it's assumes presense
# of 'perl' executable and Debian-specific 'dch' executable.
#
-
-import sys
-import string
+
import os
+import os.path
+import re
+import string
+import sys
-def spec(version):
- os.system("perl -pi -e 's|^Version:.*|Version: %s|' boost-jam.spec" %
- string.join(version, "."))
+srcdir = os.path.abspath(os.path.dirname(__file__ ))
+docdir = os.path.abspath(os.path.join(srcdir,"..","doc"))
-def build_jam(version):
- os.system("perl -pi -e 's|^VERSION = .* ;|VERSION = %s\$(.)%s\$(.)%s ;|'
build.jam"
- % (version[0], version[1], version[2]))
+def edit(file,replacements):
+ print " '%s'..." %(file)
+ text = open(file,'r').read()
+ while len(replacements) > 0:
+ #~ print " '%s' ==> '%s'" % (replacements[0],replacements[1])
+ text = re.compile(replacements[0],re.M).subn(replacements[1],text)[0]
+ replacements = replacements[2:]
+ #~ print text
+ open(file,'w').write(text)
-def index_html(version):
- os.system("perl -pi -e 's|This is version .* of BJam|This is version %s of
BJam|' index.html"
- % string.join(version, "."))
+def make_edits(version):
+ edit(os.path.join(srcdir,"boost-jam.spec"), [
+ '^Version:.*$','Version: %s' % string.join(version, "."),
+ ])
-def jam_c(version):
- re = "\\*major_version = .*, \\*minor_version = .*, \\*changenum = .*";
- new = ('*major_version = "%02d", *minor_version = "%02d", *changenum =
"%02d";' %
- (int(version[0]), int(version[1]), int(version[2])))
- os.system("perl -pi -e 's|%s|%s|' jam.c" % (re, new))
+ edit(os.path.join(srcdir,"build.jam"), [
+ '^_VERSION_ = .* ;$','_VERSION_ = %s %s %s ;' % (version[0],
version[1], version[2]),
+ ])
-def patchlevel(version):
- os.system("perl -pi -e 's|VERSION .*|VERSION \"%s\"|' patchlevel.h" %
- string.join(version, "."))
+ edit(os.path.join(docdir,"bjam.qbk"), [
+ '\[version.*\]','[version: %s]' % string.join(version, '.'),
+ '\[def :version:.*\]','[def :version: %s]' % string.join(version, '.'),
+ ])
-def dch(version):
- os.system("dch --ignore-dirname -v " + string.join(version, ".") + "-1")
-
-bumpers = [spec, build_jam, index_html, jam_c, patchlevel, dch]
+ edit(os.path.join(srcdir,"patchlevel.h"), [
+ '^#define VERSION_MAJOR .*$',
+ '#define VERSION_MAJOR %s' % (version[0]),
+ '^#define VERSION_MINOR .*$',
+ '#define VERSION_MINOR %s' % (version[1]),
+ '^#define VERSION_PATCH .*$',
+ '#define VERSION_PATCH %s' % (version[2]),
+ '^#define VERSION_MAJOR_SYM .*$',
+ '#define VERSION_MAJOR_SYM "0%s"' % (version[0]),
+ '^#define VERSION_MINOR_SYM .*$',
+ '#define VERSION_MINOR_SYM "%s"' % (version[1]),
+ '^#define VERSION_PATCH_SYM .*$',
+ '#define VERSION_PATCH_SYM "%s"' % (version[2]),
+ '^#define VERSION .*$',
+ '#define VERSION "%s"' % string.join(version, '.'),
+ '^#define JAMVERSYM .*$',
+ '#define JAMVERSYM "JAMVERSION=%s.%s"' % (version[0],version[1]),
+ ])
def main():
if len(sys.argv) < 2:
print "Expect new version as argument"
sys.exit(1)
-
- new_version = string.split(sys.argv[1], ".")
- print "Setting version to", new_version
- for b in bumpers:
- b(new_version)
+
+ version = string.split(sys.argv[1], ".")
+ print "Setting version to", version
+ make_edits(version)
if __name__ == '__main__':
main()
+
+#~ Copyright 2006 Rene Rivera.
+#~ Copyright 2005-2006 Vladimir Prus.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or
http://www.boost.org/LICENSE_1_0.txt)
Index: patchlevel.h
===================================================================
RCS file: /cvsroot/boost/boost/tools/jam/src/patchlevel.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- patchlevel.h 3 Oct 2005 00:47:36 -0000 1.17
+++ patchlevel.h 6 Jun 2006 20:42:08 -0000 1.18
@@ -9,9 +9,9 @@
#define VERSION_MAJOR 3
#define VERSION_MINOR 1
-#define VERSION_PATCH 12
+#define VERSION_PATCH 13
#define VERSION_MAJOR_SYM "03"
#define VERSION_MINOR_SYM "1"
-#define VERSION_PATCH_SYM "12"
-#define VERSION "3.1.12"
+#define VERSION_PATCH_SYM "13"
+#define VERSION "3.1.13"
#define JAMVERSYM "JAMVERSION=3.1"
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs