summaryrefslogtreecommitdiff
path: root/cpp/makedist.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-09-27 13:38:22 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-09-27 13:38:22 +0000
commited1ad58848d0b0b48baba7bc283ec553ad9623ba (patch)
treed32b06f32be55684786c0459752b1f0ddd4a8cea /cpp/makedist.py
parentFix to look for transformdb in /usr/bin and ICE_HOME/bin (diff)
downloadice-ed1ad58848d0b0b48baba7bc283ec553ad9623ba.tar.bz2
ice-ed1ad58848d0b0b48baba7bc283ec553ad9623ba.tar.xz
ice-ed1ad58848d0b0b48baba7bc283ec553ad9623ba.zip
Added support for @mmver@
Diffstat (limited to 'cpp/makedist.py')
-rwxr-xr-xcpp/makedist.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/cpp/makedist.py b/cpp/makedist.py
index e6301b2ef1e..ebd5d028cf4 100755
--- a/cpp/makedist.py
+++ b/cpp/makedist.py
@@ -178,14 +178,17 @@ def fixMakeRules(file):
#
# Fix version in README, INSTALL files
#
-def fixVersion(files, version):
+def fixVersion(files, version, mmversion):
for file in files:
origfile = file + ".orig"
os.rename(file, origfile)
oldFile = open(origfile, "r")
newFile = open(file, "w")
- newFile.write(re.sub("@ver@", version, oldFile.read()))
+ line = oldFile.read();
+ line = re.sub("@ver@", version, line)
+ line = re.sub("@mmver@", mmversion, line)
+ newFile.write(line)
newFile.close()
oldFile.close()
os.remove(origfile)
@@ -366,10 +369,11 @@ if not skipDocs:
#
config = open(os.path.join("ice", "include", "IceUtil", "Config.h"), "r")
version = re.search("ICE_STRING_VERSION \"([0-9\.]*)\"", config.read()).group(1)
+mmversion = re.search("([0-9]*\.[0-9]*)\.[0-9]*", version).group(1)
print "Fixing version in README and INSTALL files..."
-fixVersion(find("ice", "README*"), version)
-fixVersion(find("ice", "INSTALL*"), version)
+fixVersion(find("ice", "README*"), version, mmversion)
+fixVersion(find("ice", "INSTALL*"), version, mmversion)
#
# Create archives.