diff options
author | Bradley Nicholes <bnicholes@apache.org> | 2002-10-16 23:48:00 +0000 |
---|---|---|
committer | Bradley Nicholes <bnicholes@apache.org> | 2002-10-16 23:48:00 +0000 |
commit | e832cda187a5927eba2f8ea96ef8fb698e5013d5 (patch) | |
tree | 35b191c26c698901ac62701ffe32fd2b202fc389 /build | |
parent | b2a9cd67feaff8fc0589135fb2f7dc8573a9d189 (diff) | |
download | httpd-e832cda187a5927eba2f8ea96ef8fb698e5013d5.tar.gz |
AWK script that extracts the version string to be later used in the link of each
NetWare binary
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97249 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build')
-rw-r--r-- | build/nw_ver.awk | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/build/nw_ver.awk b/build/nw_ver.awk new file mode 100644 index 0000000000..868dd1520b --- /dev/null +++ b/build/nw_ver.awk @@ -0,0 +1,25 @@ +BEGIN { + + # fetch Apache version numbers from input file and writes them to STDOUT + + while ((getline < ARGV[1]) > 0) { + if (match ($0, /^#define AP_SERVER_MAJORVERSION "[^"]+"/)) { + ver_major = substr($3, 2, length($3) - 2); + } + else if (match ($0, /^#define AP_SERVER_MINORVERSION "[^"]+"/)) { + ver_minor = substr($3, 2, length($3) - 2); + } + else if (match ($0, /^#define AP_SERVER_PATCHLEVEL/)) { + ver_str_patch = substr($3, 2, length($3) - 2); + if (match (ver_str_patch, /[0-9][0-9]*/)) { + ver_patch = substr(ver_str_patch, RSTART, RLENGTH); + } + } + } + ver = ver_major "," ver_minor "," ver_patch; + ver_str = ver_major "." ver_minor "." ver_str_patch; + + print "VERSION = " ver ""; + print "VERSION_STR = " ver_str ""; + +} |