docs: fix a typo in history file
[bbaumbach/samba-autobuild/.git] / third_party / waf / waflib / extras / local_rpath.py
1 #! /usr/bin/env python
2 # encoding: utf-8
3 # Thomas Nagy, 2011 (ita)
4
5 import copy
6 from waflib.TaskGen import after_method, feature
7
8 @after_method('propagate_uselib_vars')
9 @feature('cprogram', 'cshlib', 'cxxprogram', 'cxxshlib', 'fcprogram', 'fcshlib')
10 def add_rpath_stuff(self):
11         all = copy.copy(self.to_list(getattr(self, 'use', [])))
12         while all:
13                 name = all.pop()
14                 try:
15                         tg = self.bld.get_tgen_by_name(name)
16                 except:
17                         continue
18                 if hasattr(tg, 'link_task'):
19                         self.env.append_value('RPATH', tg.link_task.outputs[0].parent.abspath())
20                         all.extend(self.to_list(getattr(tg, 'use', [])))
21