X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=build%2Fgenconf;h=eaf2d1c727155632aca5700c29fcd0cda82e7bcc;hb=0aa0feda15b70ddcd717ee1421b2c39ba196e581;hp=ac9755f4aaa7b28b2495b82baf111cc3d06a30dc;hpb=f3625d622964cf99300ceb7e499b99ebbce9fe69;p=libucw.git diff --git a/build/genconf b/build/genconf index ac9755f4..eaf2d1c7 100755 --- a/build/genconf +++ b/build/genconf @@ -10,12 +10,19 @@ use warnings; open CF, $ARGV[2] or die "Unable to open $ARGV[2]"; my %options = (); my %vars = (); +sub opt { + my ($k,$v) = @_; + $vars{$k} = $v; + $options{$k} = 1 if ($k =~ /^CONFIG_/); +} +foreach my $k (keys %ENV) { + opt($k, $ENV{$k}); +} while () { chomp; if (my ($k,$v) = /^(\w+)=(.*)/) { $v =~ s/\s+$//; - $vars{$k} = $v; - $options{$k} = 1 if ($k =~ /^CONFIG_/); + opt($k, $v); } } close CF;