apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fua...@apache.org
Subject svn commit: r1486495 - in /apr/apr/trunk/build: NWGNUtail.inc nw_ver.awk
Date Mon, 27 May 2013 00:00:55 GMT
Author: fuankg
Date: Mon May 27 00:00:55 2013
New Revision: 1486495

URL: http://svn.apache.org/r1486495
Log:
Use SVN revision for NetWare dev builds version info.

Modified:
    apr/apr/trunk/build/NWGNUtail.inc
    apr/apr/trunk/build/nw_ver.awk

Modified: apr/apr/trunk/build/NWGNUtail.inc
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/NWGNUtail.inc?rev=1486495&r1=1486494&r2=1486495&view=diff
==============================================================================
--- apr/apr/trunk/build/NWGNUtail.inc (original)
+++ apr/apr/trunk/build/NWGNUtail.inc Mon May 27 00:00:55 2013
@@ -114,9 +114,8 @@ endif
 ifneq "$(MAKECMDGOALS)" "clean"
 ifneq "$(findstring clobber_,$(MAKECMDGOALS))" "clobber_"
 $(APRBUILD)/NWGNUversion.inc : $(APRBUILD)/nw_ver.awk $(APR)/include/apr_version.h
-#	@echo Generating $@
 	@echo $(DL)GEN  $@$(DL)
-	@$(AWK) -f $^ > $@
+	$(AWK) -f $^ $(APR)/.svn/all-wcprops > $@
 
 -include $(APRBUILD)/NWGNUversion.inc
 
@@ -129,6 +128,11 @@ VERSION_MAJMIN	= 20
 endif
 endif
 endif
+ifeq "$(USE_SVNREV)" "1"
+ifneq "$(strip $(SVN_REVISION))" ""
+CFLAGS	+= -DAPR_IS_DEV_STRING=\"$(SVN_REVISION)\"
+endif
+endif
 
 ifeq "$(words $(strip $(TARGET_nlm)))" "1"
 INCLUDE_BLDCMDS	= 1

Modified: apr/apr/trunk/build/nw_ver.awk
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/nw_ver.awk?rev=1486495&r1=1486494&r2=1486495&view=diff
==============================================================================
--- apr/apr/trunk/build/nw_ver.awk (original)
+++ apr/apr/trunk/build/nw_ver.awk Mon May 27 00:00:55 2013
@@ -31,7 +31,18 @@ BEGIN {
       ver_devbuild = 1;
     }
   }
-  ver_str = ver_major "." ver_minor "." ver_patch (ver_devbuild ? "-dev" : "");
+  if (ver_devbuild) {
+    ver_dev = "-dev"
+    if (ARGV[2]) {
+      while ((getline < ARGV[2]) > 0) {
+        if (match ($0, /^\/repos\/asf\/!svn\/ver\/[0-9]+\/apr\/(apr|apr-util)\/(trunk|branches\/[0-9]\.[0-9]\.x)$/))
{
+          gsub(/^\/repos\/asf\/!svn\/ver\/|\/apr\/(apr|apr-util)\/(trunk|branches\/[0-9]\.[0-9]\.x)$/,
"", $0);
+          ver_dev = svn_rev = "-r" $0;
+        }
+      }
+    }
+  }
+
   if (WANTED) {
     ver_num = ver_major * 1000000 + ver_minor * 1000 + ver_patch;
     if (ver_num < WANTED) {
@@ -46,9 +57,12 @@ BEGIN {
     }
   } else {
     ver_nlm = ver_major "," ver_minor "," ver_patch;
+    ver_str = ver_major "." ver_minor "." ver_patch ver_dev;
     print "VERSION = " ver_nlm "";
     print "VERSION_STR = " ver_str "";
     print "VERSION_MAJMIN = " ver_major ver_minor "";
+    # print "COPYRIGHT_STR = " copyright_str "";
+    print "SVN_REVISION = " svn_rev "";
   }
 
 }



Mime
View raw message