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