add base_path_join
authorPhil Blundell <philb@gnu.org>
Sun, 25 Feb 2007 12:08:31 +0000 (12:08 +0000)
committerPhil Blundell <philb@gnu.org>
Sun, 25 Feb 2007 12:08:31 +0000 (12:08 +0000)
classes/base.bbclass

index 504707e..a08ba97 100644 (file)
@@ -1,5 +1,15 @@
 BB_DEFAULT_TASK = "build"
 
+# like os.path.join but doesn't treat absolute RHS specially
+def base_path_join(a, *p):
+    path = a
+    for b in p:
+        if path == '' or path.endswith('/'):
+            path +=  b
+        else:
+            path += '/' + b
+    return path
+
 def base_dep_prepend(d):
        import bb;
        #