httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: httpd-2.0/build nw_ver.awk
Date Wed, 16 Oct 2002 23:48:00 GMT
bnicholes    2002/10/16 16:48:00

  Added:       build    nw_ver.awk
  Log:
  AWK script that extracts the version string to be later used in the link of each
  NetWare binary
  
  Revision  Changes    Path
  1.1                  httpd-2.0/build/nw_ver.awk
  
  Index: nw_ver.awk
  ===================================================================
  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 "";
  
  }
  
  
  

Mime
View raw message