X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=build%2Fgenconf;h=30e8896c3a58901e5085880ed6628d0e5600665d;hb=eec6d2c37cbcbf9c350aa4ca80e5a316e5144087;hp=eaf2d1c727155632aca5700c29fcd0cda82e7bcc;hpb=dc63fe59d2bb4c3eb8be67790a55069c8c0a46a9;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;