]> git.openpandora.org Git - openembedded.git/commitdiff
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 504707e37ba3d0b30aba62c2ceb73d65ce36b298..a08ba97fde3d4a447cd1bccb4765bce53b0f8a34 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;
        #