Anonymous avatar Anonymous committed 910cac6

possible osx fixes

Comments (0)

Files changed (1)


 	# remember that the install paths are given by the task generators
-	# we need to define install_task even during the build phase because others might need the installation path
 		inst_to = self.install_path
 	except AttributeError:
 # ============ the code above must not know anything about vnum processing on unix platforms =========
 @feature('cshlib', 'cxxshlib', 'dshlib', 'fcshlib', 'vnum')
+@after_method('apply_link', 'propagate_uselib_vars')
 def apply_vnum(self):
 	Enforce version numbering on shared libraries. The valid version numbers must have at most two dots::
 		t3 = bld.symlink_as(path + os.sep + libname, name3)
 		self.vnum_install_task = (t1, t2, t3)
-	if '-dynamiclib' in self.env['LINKFLAGS'] and getattr(self, 'install_task', None):
-		path = os.path.join(self.install_task.get_install_path(), self.link_task.outputs[0].name)
-		self.env.append_value('LINKFLAGS', ['-install_name', path])
+	if '-dynamiclib' in self.env['LINKFLAGS']:
+		# this requires after(propagate_uselib_vars)
+		try:
+			inst_to = self.install_path
+		except AttributeError:
+			inst_to = self.link_task.__class__.inst_to
+		if inst_to:
+			p = Utils.subst_vars(inst_to, self.env)
+			path = os.path.join(p, self.link_task.outputs[0].name)
+			self.env.append_value('LINKFLAGS', ['-install_name', path])
 class vnum(Task.Task):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.