forked from lix-project/lix
* Allow lists in package bindings, e.g.,
("srcs", [Relative("foo/bar.c"), Relative("foo/baz.h")]) The result is an environment variable that contains the path names of the inputs separated by spaces (so this is not safe for values containing spaces).
This commit is contained in:
parent
ebbb6ce578
commit
31e4aa6439
12
src/fix.cc
12
src/fix.cc
|
@ -170,6 +170,18 @@ static string processBinding(EvalState & state, Expr e, FState & fs)
|
|||
|
||||
if (ATmatch(e, "False")) return "";
|
||||
|
||||
ATermList l;
|
||||
if (ATmatch(e, "[<list>]", &l)) {
|
||||
string s;
|
||||
bool first = true;
|
||||
while (!ATisEmpty(l)) {
|
||||
if (!first) s = s + " "; else first = false;
|
||||
s += processBinding(state, evalExpr(state, ATgetFirst(l)), fs);
|
||||
l = ATgetNext(l);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
throw badTerm("invalid package binding", e);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue