diff --git a/tools/winapi/make_filter_options.pm b/tools/winapi/make_filter_options.pm index 9a2ab996487..e1ef799b588 100644 --- a/tools/winapi/make_filter_options.pm +++ b/tools/winapi/make_filter_options.pm @@ -39,7 +39,7 @@ my %options_long = ( "make" => { default => "make", parser => \&parse_value, - description => "use which make" }, + description => "Specifies the make command" }, "pedantic" => { default => 0, description => "be pedantic" }, ); diff --git a/tools/winapi/options.pm b/tools/winapi/options.pm index ad2a7155388..33aff9fc693 100644 --- a/tools/winapi/options.pm +++ b/tools/winapi/options.pm @@ -331,20 +331,20 @@ sub show_help { for my $name (sort(keys(%$options_long))) { my $option = $$options_long{$name}; my $description = $$option{description}; - my $default = $$option{default}; + my $parser = $$option{parser}; my $current = ${$self->{$$option{key}}}; my $value = $current; my $command; - if(ref($value) ne "HASH") { + if(!defined $parser) { if($value) { $command = "--no-$name"; } else { $command = "--$name"; } } else { - if($value->{active}) { + if(ref($value) eq "HASH" && $value->{active}) { $command = "--[no-]$name\[=]"; } else { $command = "--$name\[=]"; @@ -352,23 +352,24 @@ sub show_help { } $output->write($command); - for (0..(($maxname - length($name) + 17) - (length($command) - length($name) + 1))) { $output->write(" "); } - if(ref($value) ne "HASH") { + $output->write(" " x (($maxname - length($name) + 17) - (length($command) - length($name) + 1))); + if(!defined $parser) { if($value) { $output->write("Disable "); } else { $output->write("Enable "); } } else { - if($value->{active}) { - $output->write("(Disable) "); - } else { - $output->write("Enable "); - } - } - if($default == $current) { - $output->write("$description\n"); + if(ref($value) eq "HASH") + { + if ($value->{active}) { + $output->write("(Disable) "); + } else { + $output->write("Enable "); + } + } } + $output->write("$description\n"); } }