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