summaryrefslogtreecommitdiffstats
path: root/wintools/version.pl
blob: 1895346336c863f2d24e0247ae9b4482cb4402d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Extract the version information from the configure script and write
# it in the version of the VERSION file to stdout.
# Should be called from the root of the distribution.

open(FILE,"<configure") || die "Could not open configure file!";

while (<FILE>) {
  if (/doxygen_version_major=(\d+)/) {
    $major=$1
  } elsif (/doxygen_version_minor=(\d+)/) {
    $minor=$1
  } elsif (/doxygen_version_revision=(\d+)/) {
    $revision=$1
  } elsif (/doxygen_version_mmn=(\w+)/ && ($1 ne "NO")) {
    $mmn=$1
  }
}

if ($mmn) {
  print "$major.$minor.$revision-$mmn\n";
} else {
  print "$major.$minor.$revision\n";
}

close(FILE);