diff options
Diffstat (limited to 'make_dist')
-rwxr-xr-x | make_dist | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -63,6 +63,7 @@ cd($tmpdir); my $config_version = get_version_from_configure(); my $code_version = get_version_from_source(); my $doc_version = get_version_from_manual(); +my $cli_version = get_version_from_cli(); my $version_error = 0; if ($version ne $config_version) @@ -80,6 +81,11 @@ if ($version ne $doc_version) print "$whoami: qpdf-manual.xml version = $doc_version\n"; $version_error = 1; } +if ($version ne $cli_version) +{ + print "$whoami: qpdf.cc version = $cli_version\n"; + $version_error = 1; +} if ($version_error) { die "$whoami: version numbers are not consistent\n"; @@ -161,6 +167,22 @@ sub get_version_from_manual $doc_version; } +sub get_version_from_cli +{ + my $fh = safe_open("qpdf/qpdf.cc"); + my $cli_version = 'unknown'; + while (<$fh>) + { + if (m/expected_version = \"([^\"]+)\"/) + { + $cli_version = $1; + last; + } + } + $fh->close(); + $cli_version; +} + sub safe_open { my $file = shift; |