aboutsummaryrefslogtreecommitdiffstats
path: root/make-version.pl
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-02-03 14:46:17 +0000
committerAnders Broman <a.broman58@gmail.com>2016-02-04 05:19:24 +0000
commit5d3d33024d8a15d671a16e97a5bf11eea9892ee3 (patch)
treee51a91c865a17930f33898ea6375e6245108b7d2 /make-version.pl
parent29b0adac8211b3da2d5c37b8fcacf9a631ba95ab (diff)
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>
Diffstat (limited to 'make-version.pl')
-rwxr-xr-xmake-version.pl13
1 files changed, 10 insertions, 3 deletions
diff --git a/make-version.pl b/make-version.pl
index a3643ddef8..76fbf2c451 100755
--- a/make-version.pl
+++ b/make-version.pl
@@ -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.