summaryrefslogtreecommitdiff
path: root/cpp/makebindist.py
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2007-02-13 17:36:47 +0000
committerBernard Normier <bernard@zeroc.com>2007-02-13 17:36:47 +0000
commitb4dc8c9796d7166ed1e1cb3ba370c80db85fc179 (patch)
treecc94c94b0ab1eb01975e20aec884332a8351511e /cpp/makebindist.py
parentadding a version fixer upper (diff)
downloadice-b4dc8c9796d7166ed1e1cb3ba370c80db85fc179.tar.bz2
ice-b4dc8c9796d7166ed1e1cb3ba370c80db85fc179.tar.xz
ice-b4dc8c9796d7166ed1e1cb3ba370c80db85fc179.zip
Fixed platform names
Diffstat (limited to 'cpp/makebindist.py')
-rwxr-xr-xcpp/makebindist.py34
1 files changed, 21 insertions, 13 deletions
diff --git a/cpp/makebindist.py b/cpp/makebindist.py
index ba6b04a9071..5ab2fecd1ce 100755
--- a/cpp/makebindist.py
+++ b/cpp/makebindist.py
@@ -90,6 +90,22 @@ def getPlatform():
if sys.platform.startswith('win') or sys.platform.startswith('cygwin'):
return 'win32'
elif sys.platform.startswith('linux'):
+ return 'linux'
+ elif sys.platform.startswith('sunos'):
+ return 'solaris'
+ elif sys.platform.startswith('hp'):
+ return 'hpux'
+ elif sys.platform.startswith('darwin'):
+ return 'macosx'
+ elif sys.platform.startswith('aix'):
+ return 'aix'
+ else:
+ return None
+
+
+def getPlatformString():
+ """Determine the platform string used in the .tar.gz names"""
+ if getPlatform() == 'linux':
redhat = os.system('test -f /etc/redhat-release')
if readcommand('uname -p') == 'x86_64':
if redhat == 0:
@@ -101,16 +117,8 @@ def getPlatform():
return 'rhel-i386'
else:
return 'sles-i586'
- elif sys.platform.startswith('sunos'):
- return 'solaris'
- elif sys.platform.startswith('hp'):
- return 'hpux'
- elif sys.platform.startswith('darwin'):
- return 'macosx'
- elif sys.platform.startswith('aix'):
- return 'aix'
else:
- return None
+ return getPlatform()
def getMakeRulesSuffix():
'''Ice for C++ contains system specific rules for make. This
@@ -976,7 +984,7 @@ def main():
installFiles = getInstallFiles(cvsTag, buildDir, version, mmVersion)
if verbose:
- print 'Building binary distributions for Ice-' + version + ' on ' + getPlatform()
+ print 'Building binary distributions for Ice-' + version + ' on ' + getPlatformString()
print 'Using build directory: ' + buildDir
print 'Using install directory: ' + installDir
print
@@ -1012,7 +1020,7 @@ def main():
if not getPlatform() in ['aix', 'solaris', 'hpux']:
sourceTarBalls.append(('icepy','IcePy-' + version, 'py'))
- if getPlatform().startswith("linux"):
+ if getPlatform() == 'linux':
sourceTarBalls.append(('icecs','IceCS-' + version, 'cs'))
if os.system('which ruby 2>/dev/null') == 0:
sourceTarBalls.append(('icerb', 'IceRuby-%s' % version, 'rb'))
@@ -1164,8 +1172,8 @@ def main():
runprog("rm -f Ice-%s/config/build.properties" % (version))
runprog("rm -f Ice-%s/config/Make.rules*" % (version))
- runprog('tar cf Ice-' + version + '-bin-' + getPlatform() + '.tar Ice-' + version)
- runprog('gzip -9 Ice-' + version + '-bin-' + getPlatform() + '.tar')
+ runprog('tar cf Ice-' + version + '-bin-' + getPlatformString() + '.tar Ice-' + version)
+ runprog('gzip -9 Ice-' + version + '-bin-' + getPlatformString() + '.tar')
os.chdir(cwd)
#