summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-03 23:26:21 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:24 +1000
commit23ff97e629eb5dc12caadeb690603691221bc92d (patch)
treeb50bfbb158e32012b5781b164ed69d21001c0fad /buildtools
parent7aa3f08f851aef234cb236b11c653f904c9e622a (diff)
downloadsamba-23ff97e629eb5dc12caadeb690603691221bc92d.tar.gz
samba-23ff97e629eb5dc12caadeb690603691221bc92d.tar.bz2
samba-23ff97e629eb5dc12caadeb690603691221bc92d.zip
build: fixed the expansions in pkgconfig files
thanks to Jelmer for the hint on this
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/wafsamba.py8
1 files changed, 7 insertions, 1 deletions
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')