summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-10-24 10:10:32 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-10-24 10:10:32 -0700
commitb2783e19a3a420c8efafbca21cfa9614d9eb7795 (patch)
tree0ea34baae7adc16c18c30d646b62174af6df6e09
parent912595dfc05d76304251fe748053f1b095db37ac (diff)
downloadnasm-b2783e19a3a420c8efafbca21cfa9614d9eb7795.tar.gz
nasm-b2783e19a3a420c8efafbca21cfa9614d9eb7795.tar.bz2
nasm-b2783e19a3a420c8efafbca21cfa9614d9eb7795.zip
version.pl: don't add an extra .00 for subminor if we don't need it
When producing the mangled version number, don't add a subminor if there isn't a patch level or release candidate number. Thus, 2.05p1 is 2.05.00.01, but 2.05 can just be 2.05. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rwxr-xr-xversion.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/version.pl b/version.pl
index 008460b..9ef6d56 100755
--- a/version.pl
+++ b/version.pl
@@ -86,7 +86,8 @@ if ($is_rc) {
$nasm_id = ($nmaj << 24)+($nmin << 16)+($nsmin << 8)+$nplvl;
-$mangled_ver = sprintf("%d.%02d.%02d", $nmaj, $nmin, $nsmin);
+$mangled_ver = sprintf("%d.%02d", $nmaj, $nmin);
+$mangled_ver .= sprintf(".%02d", $nsmin) if ($nsmin || $nplvl);
$mangled_ver .= '.'.$nplvl if ($nplvl != 0);
($mtail = $tail) =~ tr/-/./;
$mangled_ver .= $mtail;