summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2008-04-09 17:25:23 +0800
committerMatthew Newhook <matthew@zeroc.com>2008-04-09 17:25:23 +0800
commita0ce2c16ee6afd424da0069c05c7ce838bbda2e6 (patch)
tree5b39dc751cb6e6233810d58ad3da25b8fbf43f69
parentMerged SL 0.1.1 3.3 refresh. (diff)
downloadice-a0ce2c16ee6afd424da0069c05c7ce838bbda2e6.tar.bz2
ice-a0ce2c16ee6afd424da0069c05c7ce838bbda2e6.tar.xz
ice-a0ce2c16ee6afd424da0069c05c7ce838bbda2e6.zip
Squashed commit of the following:
commit 6c89bb620178da1fada690619a1d5071f719d310 Author: Matthew Newhook <matthew@zeroc.com> Date: Wed Apr 9 17:24:48 2008 +0800 Fixes to the makedlsdist. commit ca4ae84cf8fb77f118398782d7ce6a1b3131efb2 Author: Matthew Newhook <matthew@zeroc.com> Date: Wed Apr 9 16:36:18 2008 +0800 Get rid of Make.common.rules.mak.icesl
-rw-r--r--config/Make.common.rules.mak312
-rw-r--r--config/Make.common.rules.mak.icesl122
-rwxr-xr-xmakesldist.py41
3 files changed, 165 insertions, 310 deletions
diff --git a/config/Make.common.rules.mak b/config/Make.common.rules.mak
index c10f372a489..8e823c7a18b 100644
--- a/config/Make.common.rules.mak
+++ b/config/Make.common.rules.mak
@@ -1,154 +1,158 @@
-# **********************************************************************
-#
-# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-# ----------------------------------------------------------------------
-# Don't change anything below this line!
-# ----------------------------------------------------------------------
-
-SHELL = /bin/sh
-VERSION = 3.3b
-INTVERSION = 3.3.51
-SHORT_VERSION = 3.3
-SOVERSION = 33b
-
-OBJEXT = .obj
-
-#
-# Ensure ice_language has been set by the file that includes this one.
-#
-!if "$(ice_language)" == ""
-!error ice_language must be defined
-!endif
-
-!if "$(USE_BIN_DIST)" == "yes"
-ice_bin_dist = 1
-!endif
-
-!if "$(AS)" == "ml64" || "$(XTARGET)" == "x64"
-x64suffix = \x64
-!endif
-
-#
-# The following variables might also be defined:
-#
-# - slice_translator: the name of the slice translator required for the build.
-# Setting this variable is required when building source trees other than the
-# the source distribution (e.g.: the demo sources).
-#
-# - ice_require_cpp: define this variable to check for the presence of the C++
-# dev kit and check for the existence of the include/Ice/Config.h header.
-#
-
-#
-# First, check if we're building a source distribution.
-#
-# If building from a source distribution, ice_dir is defined to the
-# top-level directory of the source distribution and ice_cpp_dir is
-# defined to the directory containing the C++ binaries and headers to
-# use to build the sources.
-#
-!if "$(ice_bin_dist)" == "" && exist ($(top_srcdir)\..\$(ice_language))
-
-ice_dir = $(top_srcdir)\..
-ice_src_dist = 1
-
-#
-# When building a source distribution, if ICE_HOME is specified, it takes precedence over
-# the source tree for building the language mappings. For example, this can be used to
-# build the Python language mapping using the translators from the distribution specified
-# by ICE_HOME.
-#
-!if "$(ICE_HOME)" != ""
-
-!if "$(slice_translator)" != ""
-!if !exist ($(ICE_HOME)\bin$(x64suffix)\$(slice_translator))
-!error Unable to find $(slice_translator) in $(ICE_HOME)\bin$(x64suffix), please verify ICE_HOME is properly configured and Ice is correctly installed.
-!endif
-!if exist ($(ice_dir)\cpp\bin\$(slice_translator))
-!message Found $(slice_translator) in both ICE_HOME\bin and $(ice_dir)\cpp\bin, ICE_HOME\bin\$(slice_translator) will be used!
-!endif
-ice_cpp_dir = $(ICE_HOME)
-!else
-!message Ignoring ICE_HOME environment variable to build current source tree.
-ice_cpp_dir = $(ice_dir)\cpp
-!endif
-
-!else
-
-ice_cpp_dir = $(ice_dir)\cpp
-
-!endif
-
-!endif
-
-#
-# Then, check if we're building against a binary distribution.
-#
-!if "$(ice_src_dist)" == ""
-
-!if "$(slice_translator)" == ""
-!error slice_translator must be defined
-!endif
-
-!if "$(ICE_HOME)" != ""
-!if !exist ($(ICE_HOME)\bin$(x64suffix)\$(slice_translator))
-!error Unable to find $(slice_translator) in $(ICE_HOME)\bin$(x64suffix), please verify ICE_HOME is properly configured and Ice is correctly installed.
-!endif
-ice_dir = $(ICE_HOME)
-!elseif exist ($(top_srcdir)/bin/$(slice_translator))
-ice_dir = $(top_srcdir)
-!elseif exist ("C:\Ice-$(VERSION)\bin$(x64suffix)\$(slice_translator)")
-ice_dir = C:\Ice-$(VERSION)
-!endif
-
-!if "$(ice_dir)" == ""
-!error Unable to find a valid Ice distribution, please verify ICE_HOME is properly configured and Ice is correctly installed.
-!endif
-ice_bin_dist = 1
-!endif
-
-#
-# If ice_require_cpp is defined, ensure the C++ headers exist
-#
-!if "$(ice_require_cpp)" == "yes"
-!if "$(ice_src_dist)" != ""
-ice_cpp_header = $(ice_cpp_dir)\include\Ice\Ice.h
-!else
-ice_cpp_header = $(ice_dir)\include\Ice\Ice.h
-!endif
-!if !exist ($(ice_cpp_header))
-!error Unable to find the C++ header file $(ice_cpp_header), please verify ICE_HOME is properly configured and Ice is correctly installed.
-!endif
-!endif
-
-#
-# Set slicedir to the path of the directory containing the Slice files.
-#
-slicedir = $(ice_dir)\slice
-
-install_slicedir = $(prefix)\slice
-
-all::
-
-install-common::
- @if not exist $(prefix) \
- @echo "Creating $(prefix)..." && \
- mkdir $(prefix)
-
- @if not exist $(install_slicedir) \
- @echo "Creating $(install_slicedir)..." && \
- mkdir $(install_slicedir)
- @echo "Copying slice files..." && \
- cmd /c "xcopy /s /y $(top_srcdir)\..\slice $(install_slicedir)" || exit 1
-
- @if exist $(top_srcdir)\..\ICE_LICENSE \
- @copy ..\ICE_LICENSE $(prefix)
- @if exist $(top_srcdir)\..\LICENSE \
- @copy ..\LICENSE $(prefix)
-
+# **********************************************************************
+#
+# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+# ----------------------------------------------------------------------
+# Don't change anything below this line!
+# ----------------------------------------------------------------------
+
+SHELL = /bin/sh
+VERSION = 3.3b
+INTVERSION = 3.3.51
+SHORT_VERSION = 3.3
+SOVERSION = 33b
+
+OBJEXT = .obj
+
+#
+# Ensure ice_language has been set by the file that includes this one.
+#
+!if "$(ice_language)" == ""
+!error ice_language must be defined
+!endif
+
+!if "$(USE_BIN_DIST)" == "yes"
+ice_bin_dist = 1
+!endif
+
+!if "$(AS)" == "ml64" || "$(XTARGET)" == "x64"
+x64suffix = \x64
+!endif
+
+#
+# The following variables might also be defined:
+#
+# - slice_translator: the name of the slice translator required for the build.
+# Setting this variable is required when building source trees other than the
+# the source distribution (e.g.: the demo sources).
+#
+# - ice_require_cpp: define this variable to check for the presence of the C++
+# dev kit and check for the existence of the include/Ice/Config.h header.
+#
+
+#
+# First, check if we're building a source distribution.
+#
+# If building from a source distribution, ice_dir is defined to the
+# top-level directory of the source distribution and ice_cpp_dir is
+# defined to the directory containing the C++ binaries and headers to
+# use to build the sources.
+#
+!if "$(ice_bin_dist)" == "" && exist ($(top_srcdir)\..\$(ice_language))
+
+ice_dir = $(top_srcdir)\..
+ice_src_dist = 1
+
+#
+# When building a source distribution, if ICE_HOME is specified, it takes precedence over
+# the source tree for building the language mappings. For example, this can be used to
+# build the Python language mapping using the translators from the distribution specified
+# by ICE_HOME.
+#
+!if "$(ICE_HOME)" != ""
+
+!if "$(slice_translator)" != ""
+!if !exist ($(ICE_HOME)\bin$(x64suffix)\$(slice_translator))
+!error Unable to find $(slice_translator) in $(ICE_HOME)\bin$(x64suffix), please verify ICE_HOME is properly configured and Ice is correctly installed.
+!endif
+!if exist ($(ice_dir)\cpp\bin\$(slice_translator))
+!message Found $(slice_translator) in both ICE_HOME\bin and $(ice_dir)\cpp\bin, ICE_HOME\bin\$(slice_translator) will be used!
+!endif
+ice_cpp_dir = $(ICE_HOME)
+!else
+!message Ignoring ICE_HOME environment variable to build current source tree.
+ice_cpp_dir = $(ice_dir)\cpp
+!endif
+
+!else
+
+ice_cpp_dir = $(ice_dir)\cpp
+
+!endif
+
+!endif
+
+#
+# Then, check if we're building against a binary distribution.
+#
+!if "$(ice_src_dist)" == ""
+
+!if "$(slice_translator)" == ""
+!error slice_translator must be defined
+!endif
+
+!if "$(ICE_HOME)" != ""
+!if !exist ($(ICE_HOME)\bin$(x64suffix)\$(slice_translator))
+!error Unable to find $(slice_translator) in $(ICE_HOME)\bin$(x64suffix), please verify ICE_HOME is properly configured and Ice is correctly installed.
+!endif
+ice_dir = $(ICE_HOME)
+!elseif exist ($(top_srcdir)/bin/$(slice_translator))
+ice_dir = $(top_srcdir)
+!elseif exist ("C:\Ice-$(VERSION)\bin$(x64suffix)\$(slice_translator)")
+ice_dir = C:\Ice-$(VERSION)
+!endif
+
+!if "$(ice_dir)" == ""
+!error Unable to find a valid Ice distribution, please verify ICE_HOME is properly configured and Ice is correctly installed.
+!endif
+ice_bin_dist = 1
+!endif
+
+#
+# If ice_require_cpp is defined, ensure the C++ headers exist
+#
+!if "$(ice_require_cpp)" == "yes"
+!if "$(ice_src_dist)" != ""
+ice_cpp_header = $(ice_cpp_dir)\include\Ice\Ice.h
+!else
+ice_cpp_header = $(ice_dir)\include\Ice\Ice.h
+!endif
+!if !exist ($(ice_cpp_header))
+!error Unable to find the C++ header file $(ice_cpp_header), please verify ICE_HOME is properly configured and Ice is correctly installed.
+!endif
+!endif
+
+#
+# Set slicedir to the path of the directory containing the Slice files.
+#
+slicedir = $(ice_dir)\slice
+
+!if exist ($(top_srcdir)\..\slice)
+install_slicedir = $(prefix)\slice
+!endif
+
+all::
+
+install-common::
+ @if not exist $(prefix) \
+ @echo "Creating $(prefix)..." && \
+ mkdir $(prefix)
+
+!if "$(install_slicedir)" != ""
+ @if not exist $(install_slicedir) \
+ @echo "Creating $(install_slicedir)..." && \
+ mkdir $(install_slicedir)
+ @echo "Copying slice files..." && \
+ cmd /c "xcopy /s /y $(top_srcdir)\..\slice $(install_slicedir)" || exit 1
+!endif
+
+ @if exist $(top_srcdir)\..\ICE_LICENSE \
+ @copy ..\ICE_LICENSE $(prefix)
+ @if exist $(top_srcdir)\..\LICENSE \
+ @copy ..\LICENSE $(prefix)
+
diff --git a/config/Make.common.rules.mak.icesl b/config/Make.common.rules.mak.icesl
deleted file mode 100644
index 292c1f0b88e..00000000000
--- a/config/Make.common.rules.mak.icesl
+++ /dev/null
@@ -1,122 +0,0 @@
-# **********************************************************************
-#
-# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-# ----------------------------------------------------------------------
-# Don't change anything below this line!
-# ----------------------------------------------------------------------
-
-SHELL = /bin/sh
-VERSION = 0.1.1
-INTVERSION = 0.1.1
-SHORT_VERSION = 0.1
-
-OBJEXT = .obj
-
-#
-# Ensure ice_language has been set by the file that includes this one.
-#
-!if "$(ice_language)" == ""
-!error ice_language must be defined
-!endif
-
-!if "$(USE_BIN_DIST)" == "yes"
-ice_bin_dist = 1
-!endif
-
-#
-# The following variables might also be defined:
-#
-# - slice_translator: the name of the slice translator required for the build.
-# Setting this variable is required when building source trees other than the
-# the source distribution (e.g.: the demo sources).
-#
-# - ice_require_cpp: define this variable to check for the presence of the C++
-# dev kit and check for the existence of the include/Ice/Config.h header.
-#
-
-#
-# First, check if we're building a source distribution.
-#
-# If building from a source distribution, ice_dir is defined to the
-# top-level directory of the source distribution and ice_cpp_dir is
-# defined to the directory containing the C++ binaries and headers to
-# use to build the sources.
-#
-!if "$(ice_bin_dist)" == "" && exist ($(top_srcdir)\..\$(ice_language))
-
-ice_dir = $(top_srcdir)\..
-ice_src_dist = 1
-
-#
-# When building a source distribution, if ICE_HOME is specified, it takes precedence over
-# the source tree for building the language mappings. For example, this can be used to
-# build the Python language mapping using the translators from the distribution specified
-# by ICE_HOME.
-#
-!if "$(ICE_HOME)" != ""
-
-!if "$(slice_translator)" != ""
-!if !exist ($(ICE_HOME)\bin\$(slice_translator))
-!error Unable to find $(slice_translator) in $(ICE_HOME)\bin, please verify ICE_HOME is properly configured and Ice is correctly installed.
-!endif
-!if exist ($(ice_dir)\cpp\bin\$(slice_translator))
-!message Found $(slice_translator) in both ICE_HOME\bin and $(ice_dir)\cpp\bin, ICE_HOME\bin\$(slice_translator) will be used!
-!endif
-ice_cpp_dir = $(ICE_HOME)
-!else
-!message Ignoring ICE_HOME environment variable to build current source tree.
-ice_cpp_dir = $(ice_dir)\cpp
-!endif
-
-!else
-
-ice_cpp_dir = $(ice_dir)\cpp
-
-!endif
-
-!endif
-
-#
-# Then, check if we're building against a binary distribution.
-#
-!if "$(ice_src_dist)" == ""
-
-!if "$(slice_translator)" == ""
-!error slice_translator must be defined
-!endif
-
-!if "$(ICE_HOME)" != ""
-!if !exist ($(ICE_HOME)\bin\$(slice_translator))
-!error Unable to find $(slice_translator) in $(ICE_HOME)\bin, please verify ICE_HOME is properly configured and Ice is correctly installed.
-!endif
-ice_dir = $(ICE_HOME)
-!elseif exist ($(top_srcdir)/bin/$(slice_translator))
-ice_dir = $(top_srcdir)
-!elseif exist ("C:\Ice-$(VERSION)\bin\$(slice_translator)")
-ice_dir = C:\Ice-$(VERSION)
-!endif
-
-!if "$(ice_dir)" == ""
-!error Unable to find a valid Ice distribution, please verify ICE_HOME is properly configured and Ice is correctly installed.
-!endif
-ice_bin_dist = 1
-!endif
-
-all::
-
-install-common::
- @if not exist $(prefix) \
- @echo "Creating $(prefix)..." && \
- mkdir $(prefix)
-
- @if exist $(top_srcdir)\..\ICE_LICENSE \
- @copy ..\ICE_LICENSE $(prefix)
- @if exist $(top_srcdir)\..\LICENSE \
- @copy ..\LICENSE $(prefix)
-
diff --git a/makesldist.py b/makesldist.py
index 1d1210d64a3..5cc25d5271f 100755
--- a/makesldist.py
+++ b/makesldist.py
@@ -29,7 +29,7 @@ filesToRemove = [
# List of files & subdirectories to keep, all others are removed.
filesToKeep = [
- "./config/Make.common.rules.mak.icesl",
+ "./config/Make.common.rules.mak",
"./cpp/Makefile.mak",
"./cpp/config/Make.rules.mak.icesl",
"./cpp/config/Make.rules.msvc",
@@ -279,26 +279,6 @@ def fixMakeRules(file):
#
# Fix version in README, INSTALL files
#
-def fixVersion(file):
-
- global version
-
- origfile = file + ".orig"
- os.rename(file, origfile)
- oldFile = open(origfile, "r")
- newFile = open(file, "w")
- line = oldFile.read();
- line = re.sub("@ver@", version, line)
- newFile.write(line)
- newFile.close()
- oldFile.close()
-
- # Preserve the executable permission
- st = os.stat(origfile)
- if st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH):
- os.chmod(file, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) # rwxr-xr-x
- os.remove(origfile)
-
def fixFilePermission(file):
patterns = [ \
@@ -415,6 +395,8 @@ def regexpEscape(expr):
def substitute(file, regexps):
for line in fileinput.input(file, True):
for (expr, text) in regexps:
+ if not expr is re:
+ expr = re.compile(expr)
line = expr.sub(text, line)
print line,
@@ -543,7 +525,7 @@ for root, dirnames, filesnames in os.walk('.'):
# Fix version of README/INSTALL files and keep track of bison/flex files for later processing
if fnmatch.fnmatch(f, "README*") or fnmatch.fnmatch(f, "INSTALL*"):
- fixVersion(filepath)
+ substitute(filepath, [("@ver@", version)])
elif fnmatch.fnmatch(f, "*.y"):
bisonFiles.append(filepath)
elif fnmatch.fnmatch(f, "*.l"):
@@ -559,17 +541,9 @@ for root, dirnames, filesnames in os.walk('.'):
# Note that this "fixes" ICE_STRING_VERSION, but not ICE_INT_VERSION
# since that is only used by the C++ code generators.
#
-configFile = "cpp/include/IceUtil/Config.h"
-origConfigFile = configFile + ".orig"
-os.rename(configFile, origConfigFile)
-oldConfigFile = open(origConfigFile, "r")
-newConfigFile = open(configFile, "w")
-line = oldConfigFile.read();
-line = re.sub('ICE_STRING_VERSION "([0-9a-z\.]+)"', 'ICE_STRING_VERSION "%s"' % version, line)
-newConfigFile.write(line)
-newConfigFile.close()
-oldConfigFile.close()
-os.remove(origConfigFile)
+substitute("cpp/include/IceUtil/Config.h",
+ [('ICE_STRING_VERSION "([0-9a-z\.]+)"', 'ICE_STRING_VERSION "%s"' % version)])
+substitute("config/Make.common.rules.mak", [('^VERSION\s+=\s*[a-z0-9\.]+', 'VERSION = %s' % version)])
print "ok"
@@ -614,7 +588,6 @@ shutil.move(os.path.join("sl", "INSTALL.txt"), os.path.join("INSTALL.txt"))
# Move *.icesl to the correct names.
#
shutil.move(os.path.join("cpp", "config", "Make.rules.mak.icesl"), os.path.join("cpp", "config", "Make.rules.mak"))
-shutil.move(os.path.join("config", "Make.common.rules.mak.icesl"), os.path.join("config", "Make.common.rules.mak"))
print "ok"