You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by fu...@apache.org on 2007/08/14 01:09:57 UTC
svn commit: r565562 - /apr/apr/branches/0.9.x/build/nw_ver.awk
Author: fuankg
Date: Mon Aug 13 16:09:57 2007
New Revision: 565562
URL: http://svn.apache.org/viewvc?view=rev&rev=565562
Log:
fixed version string for dev builds; added check for wanted version.
Modified:
apr/apr/branches/0.9.x/build/nw_ver.awk
Modified: apr/apr/branches/0.9.x/build/nw_ver.awk
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/build/nw_ver.awk?view=diff&rev=565562&r1=565561&r2=565562
==============================================================================
--- apr/apr/branches/0.9.x/build/nw_ver.awk (original)
+++ apr/apr/branches/0.9.x/build/nw_ver.awk Mon Aug 13 16:09:57 2007
@@ -10,16 +10,31 @@
ver_minor = $3;
}
else if (match ($0, /^#define APR_PATCH_VERSION/)) {
- ver_str_patch = $3;
- if (match (ver_str_patch, /[0-9][0-9]*/)) {
- ver_patch = substr(ver_str_patch, RSTART, RLENGTH);
- }
+ ver_patch = $3;
+ }
+ else if (match ($0, /^#define APR_IS_DEV_VERSION/)) {
+ ver_devbuild = 1;
}
}
- ver = ver_major "," ver_minor "," ver_patch;
- ver_str = ver_major "." ver_minor "." ver_str_patch;
-
- print "VERSION = " ver "";
- print "VERSION_STR = " ver_str "";
+ ver_str = ver_major "." ver_minor "." ver_patch (ver_devbuild ? "-dev" : "");
+ if (WANTED) {
+ ver_num = ver_major * 1000000 + ver_minor * 1000 + ver_patch;
+ if (ver_num < WANTED) {
+ print "ERROR: APR version " ver_str " does NOT match!";
+ exit 1;
+ } else if (ver_num >= 1000000) {
+ print "ERROR: APR version " ver_str " higher than expected!";
+ exit 1;
+ } else {
+ print "OK: APR version " ver_str "";
+ exit 0;
+ }
+ } else {
+ ver_nlm = ver_major "," ver_minor "," ver_patch;
+ print "VERSION = " ver_nlm "";
+ print "VERSION_STR = " ver_str "";
+ }
}
+
+