summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2007-02-25 12:08:31 +0000
committerPhil Blundell <philb@gnu.org>2007-02-25 12:08:31 +0000
commit42616023e9a94e37d2fd5c6330ffbad089927b00 (patch)
tree95d1594ff3c75e4189f07a0bad5aa704024ebc45 /classes
parente1f44e0329e5a69d708f8cdb64a525cc4bfdb025 (diff)
add base_path_join
Diffstat (limited to 'classes')
-rw-r--r--classes/base.bbclass10
1 files changed, 10 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 504707e37b..a08ba97fde 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -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;
#