From 42616023e9a94e37d2fd5c6330ffbad089927b00 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Sun, 25 Feb 2007 12:08:31 +0000 Subject: add base_path_join --- classes/base.bbclass | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'classes') 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; # -- cgit v1.2.3