diff options
author | Thomas Nagy <tnagy2pow10@gmail.com> | 2013-09-17 00:00:40 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2015-01-27 11:02:16 +0100 |
commit | 23a4ba874011814580e81bbb811c7a401e7868a6 (patch) | |
tree | e4d5cc77ce5604678ce030a1181ee07e77899ad8 /buildtools/wafadmin | |
parent | aada20e0c0659e3bc556fabbae203eaddacba1b3 (diff) | |
download | samba-23a4ba874011814580e81bbb811c7a401e7868a6.tar.gz |
wafadmin: backported the openbsd fixes from waf 1.7
This is a backport from waf 1.5...
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jan 9 02:02:07 CET 2015 on sn-devel-104
(cherry picked from commit 115eb94215f4d9c73d05606de2ad978f6b48d07f)
Diffstat (limited to 'buildtools/wafadmin')
-rw-r--r-- | buildtools/wafadmin/Tools/ccroot.py | 18 | ||||
-rw-r--r-- | buildtools/wafadmin/Tools/gcc.py | 4 | ||||
-rw-r--r-- | buildtools/wafadmin/Tools/gxx.py | 4 |
3 files changed, 20 insertions, 6 deletions
diff --git a/buildtools/wafadmin/Tools/ccroot.py b/buildtools/wafadmin/Tools/ccroot.py index 264bdc7f0f6..d59cf266339 100644 --- a/buildtools/wafadmin/Tools/ccroot.py +++ b/buildtools/wafadmin/Tools/ccroot.py @@ -177,10 +177,14 @@ def get_target_name(self): dir, name = os.path.split(self.target) - if self.env.DEST_BINFMT == 'pe' and getattr(self, 'vnum', None) and 'cshlib' in self.features: - # include the version in the dll file name, - # the import lib file name stays unversionned. - name = name + '-' + self.vnum.split('.')[0] + if 'cshlib' in self.features and getattr(self, 'vnum', None): + nums = self.vnum.split('.') + if self.env.DEST_BINFMT == 'pe': + # include the version in the dll file name, + # the import lib file name stays unversionned. + name = name + '-' + nums[0] + elif self.env.DEST_OS == 'openbsd': + pattern = '%s.%s.%s' % (pattern, nums[0], nums[1]) return os.path.join(dir, pattern % name) @@ -598,14 +602,16 @@ def apply_vnum(self): if not path: return if self.env.DEST_OS == 'openbsd': - bld.install_as(path + os.sep + name2, node, env=self.env, chmod=self.link_task.chmod) + libname = self.link_task.outputs[0].name + bld.install_as('%s%s%s' % (path, os.sep, libname), node, env=self.env) else: bld.install_as(path + os.sep + name3, node, env=self.env) bld.symlink_as(path + os.sep + name2, name3) bld.symlink_as(path + os.sep + libname, name3) # the following task is just to enable execution from the build dir :-/ - self.create_task('vnum', node, [node.parent.find_or_declare(name2), node.parent.find_or_declare(name3)]) + if self.env.DEST_OS != 'openbsd': + self.create_task('vnum', node, [node.parent.find_or_declare(name2), node.parent.find_or_declare(name3)]) def exec_vnum_link(self): for x in self.outputs: diff --git a/buildtools/wafadmin/Tools/gcc.py b/buildtools/wafadmin/Tools/gcc.py index 420b44fd8f2..a6be0b28dbf 100644 --- a/buildtools/wafadmin/Tools/gcc.py +++ b/buildtools/wafadmin/Tools/gcc.py @@ -114,6 +114,10 @@ def gcc_modifier_aix(conf): v['SHLIB_MARKER'] = '' @conftest +def gcc_modifier_openbsd(conf): + conf.env['SONAME_ST'] = [] + +@conftest def gcc_modifier_platform(conf): # * set configurations specific for a platform. # * the destination platform is detected automatically by looking at the macros the compiler predefines, diff --git a/buildtools/wafadmin/Tools/gxx.py b/buildtools/wafadmin/Tools/gxx.py index 8f4a0bfef06..4984122e5e6 100644 --- a/buildtools/wafadmin/Tools/gxx.py +++ b/buildtools/wafadmin/Tools/gxx.py @@ -112,6 +112,10 @@ def gxx_modifier_aix(conf): v['SHLIB_MARKER'] = '' @conftest +def gxx_modifier_openbsd(conf): + conf.env['SONAME_ST'] = [] + +@conftest def gxx_modifier_platform(conf): # * set configurations specific for a platform. # * the destination platform is detected automatically by looking at the macros the compiler predefines, |