From 23ff97e629eb5dc12caadeb690603691221bc92d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 3 Apr 2010 23:26:21 +1100 Subject: build: fixed the expansions in pkgconfig files thanks to Jelmer for the hint on this --- buildtools/wafsamba/wafsamba.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 7a71a2ee2f..2cfbe7a583 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -627,6 +627,7 @@ def subst_at_vars(task): # split on the vars a = re.split('(@\w+@)', s) out = [] + back_sub = [ ('PREFIX', '${prefix}'), ('EXEC_PREFIX', '${exec_prefix}')] for v in a: if re.match('@\w+@', v): vname = v[1:-1] @@ -635,7 +636,12 @@ def subst_at_vars(task): if not vname in task.env: print "Unknown substitution %s in %s" % (v, task.name) raise - v = task.env[vname] + v = SUBST_VARS_RECURSIVE(task.env[vname], task.env) + # now we back substitute the allowed pc vars + for (b, m) in back_sub: + s = task.env[b] + if s == v[0:len(s)]: + v = m + v[len(s):] out.append(v) contents = ''.join(out) f = open(tgt, 'w') -- cgit