summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/config/Make.rules52
-rwxr-xr-xcpp/config/Make.rules.mak19
-rwxr-xr-xcpp/fixCopyright.py285
-rwxr-xr-xcpp/fixVersion.py429
4 files changed, 22 insertions, 763 deletions
diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules
index 4bbf417de83..4536a4e97d4 100644
--- a/cpp/config/Make.rules
+++ b/cpp/config/Make.rules
@@ -117,38 +117,34 @@ KERBEROS_HOME ?= /usr/kerberos
# Don't change anything below this line!
# ----------------------------------------------------------------------
-# Setup some variables for Make.rules.common
+#
+# Common definitions
+#
ice_language = cpp
ifneq ($(shell test -d $(top_srcdir)/../cpp && echo 0),0)
- # Don't require slice2cpp if it's the source distribution.
+ # Don't check for slice2cpp in ICE_HOME if building the source distribution
slice_translator = slice2cpp
endif
-ifeq ($(shell test -f $(top_srcdir)/../config/Make.common.rules && echo 0),0)
- include $(top_srcdir)/../config/Make.common.rules
-else
+ifeq ($(shell test -f $(top_srcdir)/config/Make.common.rules && echo 0),0)
include $(top_srcdir)/config/Make.common.rules
+else
+ include $(top_srcdir)/../config/Make.common.rules
endif
-SHELL = /bin/sh
-VERSION_MAJOR = 3
-VERSION_MINOR = 3
-VERSION = 3.3.0
-SOVERSION = 33
-
install_includedir = $(prefix)/include
install_slicedir = $(prefix)/slice
install_schemadir = $(prefix)/schema
install_docdir = $(prefix)/doc
-
-INSTALL = cp -fp
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_LIBRARY = ${INSTALL}
-INSTALL_DATA = ${INSTALL}
-
-OBJEXT = .o
-
-UNAME := $(shell uname)
+ifdef ice_src_dist
+ bindir = $(top_srcdir)/bin
+ libdir = $(top_srcdir)/lib
+ includedir = $(top_srcdir)/include
+else
+ bindir = $(ice_dir)/bin
+ libdir = $(ice_dir)/$(libsubdir)
+ includedir = $(ice_dir)/include
+endif
#
# Platform specific definitions
@@ -165,22 +161,6 @@ else
libsubdir := lib
endif
-ifdef ice_src_dist
- bindir = $(top_srcdir)/bin
- libdir = $(top_srcdir)/lib
- includedir = $(top_srcdir)/include
-else
- bindir = $(ice_dir)/bin
- libdir = $(ice_dir)/$(libsubdir)
- includedir = $(ice_dir)/include
-endif
-
-ifdef ice_rpm_dist
- slicedir = /usr/share/Ice-$(VERSION)/slice
-else
- slicedir = $(ice_dir)/slice
-endif
-
ifneq ($(embedded_runpath_prefix),)
runpath_libdir := $(embedded_runpath_prefix)/$(libsubdir)
endif
diff --git a/cpp/config/Make.rules.mak b/cpp/config/Make.rules.mak
index d76b80e906a..1e9bcfdf591 100755
--- a/cpp/config/Make.rules.mak
+++ b/cpp/config/Make.rules.mak
@@ -82,10 +82,12 @@ MT = mt.exe
# Don't change anything below this line!
# ----------------------------------------------------------------------
-# Setup some variables for Make.rules.common.mak
+#
+# Common definitions
+#
ice_language = cpp
!if !exist ($(top_srcdir)\..\cpp)
-# Don't require slice2cpp if it's the source distribution.
+# Don't check for slice2cpp in ICE_HOME if building the source distribution
slice_translator = slice2cpp
!endif
@@ -95,10 +97,6 @@ slice_translator = slice2cpp
!include $(top_srcdir)\config\Make.common.rules.mak
!endif
-SHELL = /bin/sh
-VERSION = 3.3.0
-SOVERSION = 33
-
!if "$(ice_src_dist)" != ""
bindir = $(top_srcdir)\bin
libdir = $(top_srcdir)\lib
@@ -109,15 +107,13 @@ libdir = $(ice_dir)\lib
includedir = $(ice_dir)\include
!endif
-slicedir = $(ice_dir)\slice
-
install_bindir = $(prefix)\bin
install_includedir = $(prefix)\include
install_slicedir = $(prefix)\slice
install_schemadir = $(prefix)\schema
install_docdir = $(prefix)\doc
-
-OBJEXT = .obj
+install_libdir = $(prefix)\lib
+libsubdir = lib
SETARGV = setargv.obj
@@ -131,9 +127,6 @@ SETARGV = setargv.obj
!error Invalid setting for CPP_COMPILER: $(CPP_COMPILER)
!endif
-install_libdir = $(prefix)\lib
-libsubdir = lib
-
!if "$(OPTIMIZE)" != "yes"
LIBSUFFIX = $(LIBSUFFIX)d
!endif
diff --git a/cpp/fixCopyright.py b/cpp/fixCopyright.py
deleted file mode 100755
index d2e0aec141d..00000000000
--- a/cpp/fixCopyright.py
+++ /dev/null
@@ -1,285 +0,0 @@
-#!/usr/bin/env python
-
-import os, sys, shutil, fnmatch, re, glob
-
-#
-# Program usage.
-#
-def usage():
- print "Usage: " + sys.argv[0] + " [options] [path]"
- print
- print "Options:"
- print "-e Fix version for Ice-E instead of Ice."
- print "-h Show this message."
- print
-
-def findSourceTree(tree, file):
- for path in [".", "..", "../..", "../../..", "../../../.."]:
- path = os.path.normpath(path)
- if os.path.exists(os.path.join(path, file)):
- break
- path = os.path.join(path, tree)
- if os.path.exists(os.path.join(path, file)):
- break
- path = None
- if not path:
- print "warning: can't find " + tree + " directory!"
- return path
-
-#
-# Returns the new copyright
-#
-def copyright(commentMark, patchIceE):
- result = [ ]
- result.append(commentMark + " **********************************************************************\n")
- result.append(commentMark + "\n")
- result.append(commentMark + " Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.\n")
- result.append(commentMark + "\n")
- if patchIceE == True:
- result.append(commentMark + " This copy of Ice-E is licensed to you under the terms described in the\n")
- result.append(commentMark + " ICEE_LICENSE file included in this distribution.\n")
- else:
- result.append(commentMark + " This copy of Ice is licensed to you under the terms described in the\n")
- result.append(commentMark + " ICE_LICENSE file included in this distribution.\n")
- result.append(commentMark + "\n")
- result.append(commentMark + " **********************************************************************\n")
- return result
-
-#
-# Replace one copyright
-#
-def replaceCopyright(file, commentMark, commentBegin, commentEnd, newCopyrightLines):
- oldFile = open(file, "r")
- oldLines = oldFile.readlines()
-
- done = 0
- commentFound = 0
- copyrightFound = 0
-
- beforeCopyrightLines = []
- oldCopyrightLines = []
- newLines = []
-
- justDone = 0
-
- if commentBegin == "":
- for x in oldLines:
- if not commentFound and not x.startswith(commentMark):
- beforeCopyrightLines.append(x)
- elif not done and x.startswith(commentMark):
- commentFound = 1
- if not copyrightFound and x.lower().find("copyright") != -1:
- copyrightFound = 1
- # skip this comment line
- oldCopyrightLines.append(x)
- else:
- if not done:
- done = 1
- justDone = 1
-
- # Eliminate double blank lines after copyright (bug introduced by previous fixCopyright script)
- if justDone == 1:
- newLines.append(x)
- if x != "\n":
- justDone = 0
- else:
- justDone = 2
- elif justDone == 2:
- if x != "\n":
- newLines.append(x)
- justDone = 0
- else:
- newLines.append(x)
- else:
- for x in oldLines:
- if not done:
- if x.startswith(commentBegin):
- commentFound = 1
- if commentFound:
- if not copyrightFound and x.find("Copyright") != -1:
- copyrightFound = 1
-
- # skip this comment line
- if x.find(commentEnd) != -1:
- done = 1
- justDone = 1
- else:
- beforeCopyrightLines.append(x)
- else:
- # Eliminate double blank lines after copyright (bug introduced by previous fixCopyright script)
- if justDone == 1:
- newLines.append(x)
- if x != "\n":
- justDone = 0
- else:
- justDone = 2
- elif justDone == 2:
- if x != "\n":
- newLines.append(x)
- justDone = 0
- else:
- newLines.append(x)
-
-
- oldFile.close()
-
- if copyrightFound and newCopyrightLines != oldCopyrightLines:
-
- origFile = file + ".orig"
- shutil.copy2(file, origFile)
-
- newFile = open(file, "w")
- newFile.writelines(beforeCopyrightLines)
- newFile.writelines(newCopyrightLines)
-
- #
- # Hack to keep the .err files
- #
- if fnmatch.fnmatch(file, "*test/Slice/errorDetection/*.ice") > 0:
- newFile.write("\n")
-
- newFile.writelines(newLines)
- newFile.close()
- print "------ Replaced copyright in " + file + " -------"
-
- return copyrightFound
-
-#
-# Replace alls copyrights
-#
-def replaceAllCopyrights(path, patchIceE):
-
- cppCopyright = copyright("//", patchIceE)
- mcCopyright = copyright("; //", patchIceE)
- makefileCopyright = copyright("#", patchIceE)
- vbCopyright = copyright("'", patchIceE)
- pythonCopyright = []
- pythonCopyright.append("#!/usr/bin/env python\n");
- pythonCopyright.extend(makefileCopyright)
- rubyCopyright = []
- rubyCopyright.append("#!/usr/bin/env ruby\n");
- rubyCopyright.extend(makefileCopyright)
- xmlCopyright = []
- xmlCopyright.append("<!--\n");
- xmlCopyright.extend(copyright("", patchIceE))
- xmlCopyright.append("-->\n");
-
- files = os.listdir(path)
- for x in files:
- fullpath = os.path.join(path, x);
- if x == "CVS":
- print "Skipping CVS directory"
- elif os.path.isdir(fullpath) and not os.path.islink(fullpath):
- replaceAllCopyrights(fullpath, patchIceE)
- else:
-
- commentMark = ""
- commentBegin = ""
- commentEnd = ""
- copyrightLines = []
- skip = 0
-
- if x == "config" or x == ".depend" or x == ".dummy" or fnmatch.fnmatch(x, "*.dsp") or fnmatch.fnmatch(x, "*.sln") or fnmatch.fnmatch(x, "*.vdproj") or fnmatch.fnmatch(x, "*.err") or fnmatch.fnmatch(x, "*.class") or fnmatch.fnmatch(x, "*.ico") or fnmatch.fnmatch(x, "*.gif") or fnmatch.fnmatch(x, "*.jpg") or fnmatch.fnmatch(x, "*.orig"):
- print "Skipping file " + fullpath + ": no copyright needed"
- skip = 1
- elif fnmatch.fnmatch(x, "*.h") or fnmatch.fnmatch(x, "*.cpp") or fnmatch.fnmatch(x, "*.cs") or fnmatch.fnmatch(x, "*.ice") or fnmatch.fnmatch(x, "*.java") or fnmatch.fnmatch(x, "*.l") or fnmatch.fnmatch(x, "*.y"):
- commentMark = "//"
- copyrightLines = cppCopyright
- elif fnmatch.fnmatch(x, "*.py"):
- commentMark = "#"
- copyrightLines = pythonCopyright
- elif fnmatch.fnmatch(x, "*.def"):
- commentMark = "#"
- copyrightLines = pythonCopyright
- elif fnmatch.fnmatch(x, "*.rb"):
- commentMark = "#"
- copyrightLines = rubyCopyright
- elif fnmatch.fnmatch(x, "*.mc"):
- commentMark = "; //"
- copyrightLines = mcCopyright
- elif fnmatch.fnmatch(x, "*.vb"):
- commentMark = "'"
- copyrightLines = vbCopyright
- elif fnmatch.fnmatch(x, "Make*") or fnmatch.fnmatch(x, "*.properties"):
- commentMark = "#"
- copyrightLines = makefileCopyright
- elif fnmatch.fnmatch(x, "*.xml")
- commentBegin = "<!--"
- commentEnd = "-->"
- copyrightLines = xmlCopyright
- else:
- print "***** Skipping file " + fullpath + ": unknown type"
- skip = 1
-
- if not skip:
- if replaceCopyright(fullpath, commentMark, commentBegin, commentEnd, copyrightLines) == 0:
- print "***** WARNING: Did not find copyright in " + fullpath
-
-#
-# Main
-#
-
-patchIceE = False
-
-for x in sys.argv[1:]:
- if x == "-h":
- usage()
- sys.exit(0)
- elif x == "-e":
- patchIceE = True
- elif x.startswith("-"):
- print sys.argv[0] + ": unknown option `" + x + "'"
- print
- usage()
- sys.exit(1)
- else:
- path = x
-
-if patchIceE:
- icee_home = findSourceTree("cppe", os.path.join("include", "IceE", "Config.h"))
- if icee_home:
- replaceAllCopyrights(icee_home, True)
-
- iceje_home = findSourceTree("javae", os.path.join("src", "IceUtil", "Version.java"))
- if iceje_home:
- replaceAllCopyrights(iceje_home, True)
-else:
- ice_home = findSourceTree("cpp", os.path.join("include", "IceUtil", "Config.h"))
- if ice_home:
- replaceAllCopyrights(ice_home, False)
-
- icej_home = findSourceTree("java", os.path.join("src", "IceUtil", "Version.java"))
- if icej_home:
- replaceAllCopyrights(icej_home, False)
-
- icecs_home = findSourceTree("cs", os.path.join("src", "Ice", "AssemblyInfo.cs"))
- if icecs_home:
- replaceAllCopyrights(icecs_home, False)
-
- icevb_home = findSourceTree("vb", os.path.join("config", "Make.rules.mak.vb"))
- if icevb_home:
- replaceAllCopyrights(icevb_home, False)
-
- icephp_home = findSourceTree("php", os.path.join("src", "IcePHP", "Profile.h"))
- if icephp_home:
- replaceAllCopyrights(icephp_home, False)
-
- icepy_home = findSourceTree("py", os.path.join("modules", "IcePy", "Config.h"))
- if icepy_home:
- replaceAllCopyrights(icepy_home, False)
-
- icerb_home = findSourceTree("rb", os.path.join("src", "IceRuby", "Config.h"))
- if icerb_home:
- replaceAllCopyrights(icerb_home, False)
-
- icedemo_home = findSourceTree("demoscript", os.path.join("pexpect.py"))
- if icedemo_home:
- replaceAllCopyrights(icedemo_home, False)
-
- icedist_home = findSourceTree("distribution", os.path.join("lib", "DistUtils.py"))
- if icedist_home:
- replaceAllCopyrights(icedist_home, False)
-
- config_home = findSourceTree("config", os.path.join("TestUtil.py"))
- if config_home:
- replaceAllCopyrights(config_home, False)
diff --git a/cpp/fixVersion.py b/cpp/fixVersion.py
deleted file mode 100755
index 18f7d8515e9..00000000000
--- a/cpp/fixVersion.py
+++ /dev/null
@@ -1,429 +0,0 @@
-#!/usr/bin/env python
-
-import os, sys, shutil, fnmatch, re, glob, getopt
-
-#
-# version pattern
-#
-vpatCheck = "[0-9]+\.[0-9]+(\.[0-9]+|b[0-9]*)$"
-vpatParse = "([0-9]+)\.([0-9]+)(\.[0-9]+|b[0-9]*)"
-vpatMatch = "([0-9]+\.[0-9]+(\.[0-9]+|b[0-9]*))"
-
-#
-# Program usage.
-#
-def usage():
- print "Usage: " + sys.argv[0] + " [-e] version"
- print
- print "Options:"
- print "-e Fix version for Ice-E instead of Ice."
- print "-h, --help Show this message."
- print
-
-
-def intVersion(version):
- r = re.search(vpatParse, version)
- major = int(r.group(1))
- minor = int(r.group(2))
- gr3 = r.group(3)
- patch = -1
- if gr3.startswith("."):
- patch = int(gr3[1:])
- else:
- if len(gr3) > 1:
- patch = 50 + int(gr3[1:])
- else:
- patch = 51
- return ("%2d%02d%02d" % (major, minor, patch)).strip()
-
-def soVersion(version):
- r = re.search(vpatParse, version)
- major = int(r.group(1))
- minor = int(r.group(2))
- v = ("%d%d" % (major, minor)).strip()
- if r.group(3).startswith("b"):
- return v + "b"
- else:
- return v
-
-def majorVersion(version):
- r = re.search(vpatParse, version)
- major = int(r.group(1))
- return ("%d" % (major)).strip()
-
-def minorVersion(version):
- r = re.search(vpatParse, version)
- minor = int(r.group(2))
- return ("%d" % (minor)).strip()
-
-def patchVersion(version):
- r = re.search(vpatParse, version)
-
- gr3 = r.group(3)
- patch = -1
- if gr3.startswith("."):
- patch = int(gr3[1:])
- else:
- if len(gr3) > 1:
- patch = 50 + int(gr3[1:])
- else:
- patch = 51
-
- return ("%d" % (patch)).strip()
-
-#
-# Find files matching a pattern.
-#
-def find(path, patt):
- result = [ ]
- files = os.listdir(path)
- for x in files:
- fullpath = os.path.join(path, x);
- if os.path.isdir(fullpath) and not os.path.islink(fullpath):
- result.extend(find(fullpath, patt))
- elif fnmatch.fnmatch(x, patt):
- result.append(fullpath)
- return result
-
-def findSourceTree(tree, file):
- for path in [".", "..", "../..", "../../..", "../../../.."]:
- path = os.path.normpath(path)
- if os.path.exists(os.path.join(path, file)):
- break
- path = os.path.join(path, tree)
- if os.path.exists(os.path.join(path, file)):
- break
- path = None
- if not path:
- print "warning: can't find " + tree + " directory!"
- return path
-
-#
-# Replace a string matched by the first group of regular expression.
-#
-# For example: the regular expression "ICE_STRING_VERSION \"([0-9]*\.[0-9]*\.[0-9]*)\""
-# will match the string version in "ICE_STRING_VERSION "2.1.0"" and will replace it with
-# the given version.
-#
-def fileMatchAndReplace(filename, matchAndReplaceExps, warn=True):
-
- oldConfigFile = open(filename, "r")
- newConfigFile = open(filename + ".new", "w")
-
- #
- # Compile the regular expressions
- #
- regexps = [ ]
- for (regexp, replace) in matchAndReplaceExps:
- regexps.append((re.compile(regexp), replace))
-
- #
- # Search for the line with the given regular expressions and
- # replace the matching string
- #
- updated = False
- for line in oldConfigFile.readlines():
- for (regexp, replace) in regexps:
- match = regexp.search(line)
- if match != None:
- oldLine = line
- line = oldLine.replace(match.group(1), replace)
-# print oldLine + line
- updated = True
- break
- newConfigFile.write(line)
-
- newConfigFile.close()
- oldConfigFile.close()
-
- if updated:
- print "updated " + filename
- os.rename(filename + ".new", filename)
- elif warn:
- print "warning: " + filename + " didn't contain any version"
- os.unlink(filename + ".new")
-
-#
-# Replace all occurences of a regular expression in a file
-#
-def fileMatchAllAndReplace(filename, matchAndReplaceExps):
-
- oldFile = open(filename, "r")
- newFile = open(filename + ".new", "w")
-
- #
- # Compile the regular expressions
- #
- regexps = [ ]
- for (regexp, replace) in matchAndReplaceExps:
- regexps.append((re.compile(regexp), replace))
-
- #
- # Search for all lines with the given regular expressions and
- # replace the matching string
- #
- updated = False
- for line in oldFile.readlines():
- for (regexp, replace) in regexps:
- match = regexp.search(line)
- if match != None:
- oldLine = line
- line = oldLine.replace(match.group(1), replace)
- updated = True
- newFile.write(line)
-
- newFile.close()
- oldFile.close()
-
- if updated:
- print "updated " + filename
- os.rename(filename + ".new", filename)
- else:
- print "warning: " + filename + " didn't contain any version"
- os.unlink(filename + ".new")
-
-if len(sys.argv) < 2:
- usage()
- sys.exit(0)
-
-patchIceE = False
-try:
- opts, args = getopt.getopt(sys.argv[1:], "he", ["help"])
-except getopt.GetoptError:
- usage()
- sys.exit(1)
-for o, a in opts:
- if o in ("-h", "--help"):
- usage()
- sys.exit(0)
- if o in ("-e"):
- patchIceE = True
-if len(args) != 1:
- usage()
- sys.exit(1)
-
-version = args[0]
-
-if not re.match(vpatCheck, version):
- print "invalid version number: " + version + " (it should have the form 3.2.1 or 3.2b or 3.2b2)"
- sys.exit(0)
-
-if not patchIceE:
- #
- # Fix version in Ice sources
- #
- ice_home = findSourceTree("cpp", os.path.join("include", "IceUtil", "Config.h"))
- if ice_home:
- fileMatchAndReplace(os.path.join(ice_home, "include", "IceUtil", "Config.h"),
- [("ICE_STRING_VERSION \"" + vpatMatch + "\"", version), \
- ("ICE_INT_VERSION ([0-9]*)", intVersion(version))])
-
- fileMatchAndReplace(os.path.join(ice_home, "config", "Make.rules"),
- [("VERSION_MAJOR[\t\s]*= ([0-9]*)", majorVersion(version)),
- ("VERSION_MINOR[\t\s]*= ([0-9]*)", minorVersion(version)),
- ("VERSION[\t\s]*= " + vpatMatch, version),
- ("SOVERSION[\t\s]*= ([0-9]+b?)", soVersion(version))])
-
-
- fileMatchAndReplace(os.path.join(ice_home, "config", "Make.rules.mak"),
- [("VERSION[\t\s]*= " + vpatMatch, version),
- ("SOVERSION[\t\s]*= ([0-9]+b?)", soVersion(version))])
-
- fileMatchAndReplace(os.path.join(ice_home, "src", "ca", "iceca"),
- [("Ice-" + vpatMatch, version)])
-
- fileMatchAndReplace(os.path.join(ice_home, "doc", "swish", "swish.conf"),
- [("doc/Ice-" + vpatMatch, version)])
-
- fileMatchAndReplace(os.path.join(ice_home, "install", "rpm", "ice.spec"),
- [("Version: " + vpatMatch, version)])
- fileMatchAndReplace(os.path.join(ice_home, "install", "rpm", "ice.spec"),
- [("%define soversion ([0-9]+b?)", soVersion(version))])
- fileMatchAndReplace(os.path.join(ice_home, "install", "rpm", "ice.spec"),
- [("%define dotnetversion ([0-9]*\.[0-9]*\.[0-9]*)",
- majorVersion(version) + "." + minorVersion(version) + "." + patchVersion(version))])
-
- fileMatchAndReplace(os.path.join(ice_home, "demo", "IceStorm", "clock", "config.icebox"),
- [("IceStormService,([0-9]+b?)", soVersion(version))])
-
- fileMatchAndReplace(os.path.join(ice_home, "demo", "IceStorm", "counter", "config.icebox"),
- [("IceStormService,([0-9]+b?)", soVersion(version))])
-
- fileMatchAndReplace(os.path.join(ice_home, "demo", "IceStorm", "replicated", "application.xml"),
- [("IceStormService,([0-9]+b?)", soVersion(version))])
-
- fileMatchAndReplace(os.path.join(ice_home, "config", "templates.xml"),
- [("IceStormService,([0-9]+b?)", soVersion(version))])
-
- #
- # Fix version in IceJ sources
- #
- icej_home = findSourceTree("java", os.path.join("src", "IceUtil", "Version.java"))
- if icej_home:
- fileMatchAndReplace(os.path.join(icej_home, "config", "build.properties"),
- [("ice\.version[\t\s]*= " + vpatMatch, \
- majorVersion(version) + "." + minorVersion(version)), \
- ("ice\.version\.patch[\t\s]*= " + vpatMatch, version)])
-
- fileMatchAndReplace(os.path.join(icej_home, "src", "IceUtil", "Version.java"),
- [("ICE_STRING_VERSION = \"" + vpatMatch +"\"", version), \
- ("ICE_INT_VERSION = ([0-9]*)", intVersion(version))])
-
- fileMatchAndReplace(os.path.join(icej_home, "demo", "IceStorm", "clock", "config.icebox"),
- [("IceStormService,([0-9]+b?)", soVersion(version))])
-
- #
- # Fix version in IceCS sources
- #
- icecs_home = findSourceTree("cs", os.path.join("src", "Ice", "AssemblyInfo.cs"))
- if icecs_home:
- for f in find(icecs_home, "AssemblyInfo.cs"):
- if f.find("generate") < 0 and f.find("ConsoleApplication") < 0:
- fileMatchAndReplace(f, [("AssemblyVersion\(\"" + vpatMatch + "\"",
- majorVersion(version) + "." + minorVersion(version) + "." + \
- patchVersion(version))])
-
- fileMatchAndReplace(os.path.join(icecs_home, "config", "Make.rules.cs"),
- [("VERSION[\t\s]*= " + vpatMatch, version)])
-
- fileMatchAndReplace(os.path.join(icecs_home, "config", "Make.rules.mak.cs"),
- [("VERSION[\t\s]*= " + vpatMatch, version)])
-
- fileMatchAndReplace(os.path.join(icecs_home, "config", "makeconfig.py"),
- [("version=*\"([0-9]*\.[0-9]*\.[0-9]*).0\"",
- majorVersion(version) + "." + minorVersion(version) + "." + patchVersion(version))])
- cmd = "chmod 770 " + os.path.join(icecs_home, "config", "makeconfig.py")
- os.system(cmd)
-
- fileMatchAndReplace(os.path.join(icecs_home, "demo", "IceStorm", "clock", "config.icebox"),
- [("IceStormService,([0-9]+b?)", soVersion(version))])
-
- for f in find(icecs_home, "*.pc"):
- print "matching " + f
- fileMatchAndReplace(f, [("[\t\s]*version[\t\s]*=[\t\s]* " + vpatMatch, majorVersion(version) + "." + \
- minorVersion(version) + "." + patchVersion(version))])
-
- for f in find(icecs_home, "config*"):
- print "matching " + f
- fileMatchAndReplace(f,
- [("Version=*([0-9]*\.[0-9]*\.[0-9]*).0",
- majorVersion(version) + "." + minorVersion(version) + "." + patchVersion(version))],
- False) # Disable warnings as many files might not have SSL configuration
-
-
- #
- # Fix version in IceVB sources
- #
- icevb_home = findSourceTree("vb", os.path.join("generate", "Generate.vb"))
- if icevb_home:
- fileMatchAndReplace(os.path.join(icevb_home, "config", "Make.rules.mak.vb"),
- [("VERSION[\t\s]*= " + vpatMatch, version)])
-
- fileMatchAndReplace(os.path.join(icevb_home, "config", "makeconfig.py"),
- [("codeBase version=\"" + vpatMatch + "\.0\"",
- majorVersion(version) + "." + minorVersion(version) + "." + patchVersion(version))])
-
- fileMatchAndReplace(os.path.join(icevb_home, "demo", "IceStorm", "clock", "config.icebox"),
- [("IceStormService,([0-9]+b?)", soVersion(version))])
-
- for f in find(icevb_home, "config*"):
- print "matching " + f
- fileMatchAndReplace(f,
- [("Version=*([0-9]*\.[0-9]*\.[0-9]*).0",
- majorVersion(version) + "." + minorVersion(version) + "." + patchVersion(version))],
- False) # Disable warnings as many files might not have SSL configuration
-
- #
- # Fix version in IcePHP
- #
- icephp_home = findSourceTree("php", os.path.join("src", "IcePHP", "Profile.h"))
- if icephp_home:
- fileMatchAndReplace(os.path.join(icephp_home, "config", "Make.rules"),
- [("VERSION_MAJOR[\t\s]*= ([0-9]*)", majorVersion(version)),
- ("VERSION_MINOR[\t\s]*= ([0-9]*)", minorVersion(version)),
- ("VERSION[\t\s]*= " + vpatMatch, version),
- ("SOVERSION[\t\s]*= ([0-9]+b?)", soVersion(version))])
-
- fileMatchAndReplace(os.path.join(icephp_home, "config", "Make.rules.mak"),
- [("VERSION[\t\s]*= " + vpatMatch, version),
- ("SOVERSION[\t\s]*= ([0-9]+b?)", soVersion(version))])
-
- print "Please update icephp/src/IcePHP/Profile.cpp: too difficult to parse!"
-
- #
- # Fix version in IcePy
- #
- icepy_home = findSourceTree("py", os.path.join("modules", "IcePy", "Config.h"))
- if icepy_home:
- fileMatchAndReplace(os.path.join(icepy_home, "config", "Make.rules"),
- [("VERSION_MAJOR[\t\s]*= ([0-9]*)", majorVersion(version)),
- ("VERSION_MINOR[\t\s]*= ([0-9]*)", minorVersion(version)),
- ("VERSION[\t\s]*= " + vpatMatch, version),
- ("SOVERSION[\t\s]*= ([0-9]+b?)", soVersion(version))])
-
- fileMatchAndReplace(os.path.join(icepy_home, "config", "Make.rules.mak"),
- [("VERSION[\t\s]*= " + vpatMatch, version),
- ("SOVERSION[\t\s]*= ([0-9]+b?)", soVersion(version))])
-
- fileMatchAndReplace(os.path.join(icepy_home, "demo", "IceStorm", "clock", "config.icebox"),
- [("IceStormService,([0-9]+b?)", soVersion(version))])
-
- fileMatchAndReplace(os.path.join(icepy_home, "demo", "Ice", "bidir", "Server.py"),
- [("Ice-" + vpatMatch, version)])
- fileMatchAndReplace(os.path.join(icepy_home, "demo", "Ice", "bidir", "Client.py"),
- [("Ice-" + vpatMatch, version)])
-
-
- #
- # Fix version in IceRuby
- #
- icerb_home = findSourceTree("rb", os.path.join("src", "IceRuby", "Config.h"))
- if icerb_home:
- fileMatchAndReplace(os.path.join(icerb_home, "config", "Make.rules"),
- [("VERSION[\t\s]*= " + vpatMatch, version),
- ("SOVERSION[\t\s]*= ([0-9]+b?)", soVersion(version))])
-
- fileMatchAndReplace(os.path.join(icerb_home, "config", "Make.rules.mak"),
- [("VERSION[\t\s]*= " + vpatMatch, version),
- ("SOVERSION[\t\s]*= ([0-9]+b?)", soVersion(version))])
-
- print "Running 'make config' in IceCS"
- os.chdir(icecs_home)
- result = os.system('gmake config')
- if result != 0:
- print "\'gmake config\' failed!!!"
-
- print "\nYou must run \"nmake /f Makefile.mak config\" in icevb to complete version change!"
-
- sys.exit(0)
-
-#
-# Fix version in Ice-E sources
-#
-icee_home = findSourceTree("cppe", os.path.join("include", "IceE", "Config.h"))
-if icee_home:
- fileMatchAndReplace(os.path.join(icee_home, "include", "IceE", "Config.h"),
- [("ICEE_STRING_VERSION \"([0-9]*\.[0-9]*\.[0-9]*)\"", version), \
- ("ICEE_INT_VERSION ([0-9]*)", intVersion(version))])
-
- fileMatchAndReplace(os.path.join(icee_home, "config", "Make.rules"),
- [("VERSION[\t\s]*= ([0-9]*\.[0-9]*\.[0-9]*)", version),
- ("SOVERSION[\t\s]*= ([0-9]*)", soVersion(version))])
-
- fileMatchAllAndReplace(os.path.join(icee_home, "src", "IceE", "ice.dsp"),
- [("icee([0-9][0-9])d?\.((dll)|(pdb))", soVersion(version))])
- fileMatchAllAndReplace(os.path.join(icee_home, "src", "IceEC", "icec.dsp"),
- [("iceec([0-9][0-9])d?\.((dll)|(pdb))", soVersion(version))])
- fileMatchAllAndReplace(os.path.join(icee_home, "test", "Common", "testCommon.dsp"),
- [("testCommon([0-9][0-9])d?\.((dll)|(pdb))", soVersion(version))])
-
-#
-# Fix version in IceJ sources
-#
-iceje_home = findSourceTree("javae", os.path.join("src", "IceUtil", "Version.java"))
-if iceje_home:
- fileMatchAndReplace(os.path.join(iceje_home, "src", "IceUtil", "Version.java"),
- [("ICEE_STRING_VERSION = \"([0-9]*\.[0-9]*\.[0-9]*)\"", version), \
- ("ICEE_INT_VERSION = ([0-9]*)", intVersion(version))])
-
-sys.exit(0)