s4-heimdal: allow heimdal build scripts to work from top level
authorAndrew Tridgell <tridge@samba.org>
Thu, 3 Feb 2011 02:06:16 +0000 (13:06 +1100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 7 Feb 2011 02:22:00 +0000 (13:22 +1100)
the version_script handling relied on the directory layout. This makes
it independent of the directory structure

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/heimdal_build/wscript_build

index 77f6a541a565814592e6ba3aa950bd5dd9e841ee..a1bd4783b04e01b9dab974f3e7d0f32efb5cf643 100644 (file)
@@ -12,8 +12,11 @@ def to_list(str):
         return str
     return str.split(None)
 
-def heimdal_path(p):
-    return os.path.join("../heimdal", p)
+def heimdal_path(p, absolute=False):
+    hpath = os.path.join("../heimdal", p)
+    if not absolute:
+        return hpath
+    return os.path.normpath(os.path.join(bld.curdir, hpath))
 
 def heimdal_paths(ps):
     return [heimdal_path(p) for p in to_list(ps)]
@@ -254,7 +257,7 @@ def HEIMDAL_LIBRARY(libname, source, deps, vnum, version_script, includes='', cf
         ldflags         = ldflags,
         vars            = [version],
         private_library = bundled_build,
-        version_script  = heimdal_path(version_script),
+        version_script  = heimdal_path(version_script, absolute=True),
         )