changeset 989:21fa90817df2

only meddle with cross/PLATFORM/ if it exists.
author hanwen <hanwen@xs4all.nl>
date Fri, 13 Jan 2006 09:07:14 +0100
parents 625a6b778787
children dcf72b375947
files specs/cross.py
diffstat 1 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/specs/cross.py	Fri Jan 13 02:26:59 2006 +0100
+++ b/specs/cross.py	Fri Jan 13 09:07:14 2006 +0100
@@ -60,16 +60,18 @@
 
 	def install (self):
 		Cross_package.install (self)
+		old_libs = self.expand ('%(install_root)s/usr/cross/%(target_architecture)s')
+
+		if os.path.isdir (old_libs):
+			for f in self.read_pipe ('cd %(old_libs)s/ && find -type f ', locals ()).split():
+				(dir, file) = os.path.split (f)
+				target = self.expand ('%(install_prefix)s/%(dir)s', locals())
+				if not os.path.isdir (target):
+					os.makedirs (target)
+
+				self.system ('mv %(old_libs)s/%(dir)s/%(file)s %(install_prefix)s/lib', locals())
+
 		## FIXME: .so senseless for darwin.
-		old_libs = self.expand ('%(install_root)s/usr/cross/%(target_architecture)s')
-		for f in self.read_pipe ('cd %(old_libs)s/ && find -type f ', locals ()).split():
-			(dir, file) = os.path.split (f)
-			target = self.expand ('%(install_prefix)s/%(dir)s', locals())
-			if not os.path.isdir (target):
-				os.makedirs (target)
-
-			self.system ('mv %(old_libs)s/%(dir)s/%(file)s %(install_prefix)s/lib', locals())
-
 		self.system ('''
 cd %(install_root)s/usr/lib && ln -fs libgcc_s.so.1 libgcc_s.so
 ''')