make-version: Silence one diagnostic message with a verbose option

Change-Id: If8b9d7e356ebfe2cbb263a4cb67b18bafdd1b8ee
Reviewed-on: https://code.wireshark.org/review/13690
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
João Valverde 2016-02-03 14:46:17 +00:00 committed by Anders Broman
parent 29b0adac82
commit 5d3d33024d
1 changed files with 10 additions and 3 deletions

View File

@ -103,12 +103,17 @@ my %version_pref = (
);
my $srcdir = ".";
my $info_cmd = "";
my $verbose = 0;
# Ensure we run with correct locale
$ENV{LANG} = "C";
$ENV{LC_ALL} = "C";
$ENV{GIT_PAGER} = "";
sub print_diag {
print STDERR @_ if $verbose;
}
# Attempt to get revision information from the repository.
sub read_repo_info {
my $line;
@ -694,7 +699,8 @@ sub get_config {
"git-bin", \$git_executable,
"print-vcs", \$print_vcs,
"set-version|v", \$set_version,
"set-release|r|package-version|p", \$set_release
"set-release|r|package-version|p", \$set_release,
"verbose", \$verbose
) || pod2usage(2);
if ($show_help) { pod2usage(1); }
@ -708,8 +714,8 @@ sub get_config {
}
if (! open(FILE, "<$vconf_file")) {
print STDERR "Version configuration file $vconf_file not "
. "found. Using defaults.\n";
print_diag "Version configuration file $vconf_file not "
. "found. Using defaults.\n";
return 1;
}
@ -778,6 +784,7 @@ make-version.pl [options] [source directory]
--set-release, -r Set the release information in configure.ac
and config.nmake
--package-version, -p Deprecated. Same as --set-release.
--verbose Print diagnostic messages to STDERR.
Options can be used in any combination. If none are specified B<--set-svn>
is assumed.