X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=build%2Fgenconf;h=30e8896c3a58901e5085880ed6628d0e5600665d;hb=5ad8b4f69ab4fdf4d75f5a56fc72ef2988f1da1f;hp=eaf2d1c727155632aca5700c29fcd0cda82e7bcc;hpb=7c01d8c6eb3c3756b3dbec4b5a8ff2c988f13145;p=moe.git diff --git a/build/genconf b/build/genconf index eaf2d1c..30e8896 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;