3
# fetch APR version numbers from input file and writes them to STDOUT
5
while ((getline < ARGV[1]) > 0) {
6
if (match ($0, /^#define APR_MAJOR_VERSION/)) {
9
else if (match ($0, /^#define APR_MINOR_VERSION/)) {
12
else if (match ($0, /^#define APR_PATCH_VERSION/)) {
14
if (match (ver_str_patch, /[0-9][0-9]*/)) {
15
ver_patch = substr(ver_str_patch, RSTART, RLENGTH);
19
ver = ver_major "," ver_minor "," ver_patch;
20
ver_str = ver_major "." ver_minor "." ver_str_patch;
22
print "VERSION = " ver "";
23
print "VERSION_STR = " ver_str "";