X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=build%2Fgenconf;h=30e8896c3a58901e5085880ed6628d0e5600665d;hb=4313ba1d176383101791bcfad9660dd16ea30a84;hp=eaf2d1c727155632aca5700c29fcd0cda82e7bcc;hpb=91c499892f07ad6494351a1c1985a0d3e2600a25;p=libucw.git diff --git a/build/genconf b/build/genconf index eaf2d1c7..30e8896c 100755 --- a/build/genconf +++ b/build/genconf @@ -66,10 +66,13 @@ while () { die "Piped command '$cmd' failed" if $?; print OUT `$1`; } else { - sub repl ($) { + sub repl($); + sub repl($) { my $v = shift @_; exists $vars{$v} or die "Cannot substitute $v: variable not set"; - return $vars{$v}; + my $x = $vars{$v}; + while ($x =~ s/\$\((\w+)\)/repl($1)/ge) { } + return $x; } s/@(\w+)@/repl($1)/ge; print OUT;