diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-10-24 10:10:32 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-10-24 10:10:32 -0700 |
commit | b2783e19a3a420c8efafbca21cfa9614d9eb7795 (patch) | |
tree | 0ea34baae7adc16c18c30d646b62174af6df6e09 /version.pl | |
parent | 912595dfc05d76304251fe748053f1b095db37ac (diff) | |
download | nasm-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>
Diffstat (limited to 'version.pl')
-rwxr-xr-x | version.pl | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |