From: Guenter Knauf Date: Tue, 14 May 2013 00:51:01 +0000 (+0000) Subject: Use SVN revision for NetWare dev builds version info. X-Git-Tag: 2.4.5~286 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84890fc5f03e16235ddce25674fd457000ba5ab5;p=apache Use SVN revision for NetWare dev builds version info. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1482160 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/build/NWGNUtail.inc b/build/NWGNUtail.inc index 8fbb8167ec..7d334f7e03 100644 --- a/build/NWGNUtail.inc +++ b/build/NWGNUtail.inc @@ -97,7 +97,7 @@ CPPOPT_DEPENDS = $(CCOPT_DEPENDS) ifneq "$(MAKECMDGOALS)" "clean" ifneq "$(findstring clobber_,$(MAKECMDGOALS))" "clobber_" -$(APBUILD)/NWGNUversion.inc: $(APBUILD)/nw_ver.awk $(SRC)/include/ap_release.h +$(APBUILD)/NWGNUversion.inc: $(APBUILD)/nw_ver.awk $(SRC)/include/ap_release.h $(SRC)/.svn/all-wcprops @echo $(DL)GEN $@$(DL) $(AWK) -f $^ > $@ @@ -112,6 +112,9 @@ VERSION_MAJMIN = 24 endif endif endif +ifneq "$(strip $(SVN_REVISION))" "" +CFLAGS += -DAP_SERVER_ADD_STRING=\"$(SVN_REVISION)\" +endif ifeq "$(words $(strip $(TARGET_nlm)))" "1" diff --git a/build/nw_ver.awk b/build/nw_ver.awk index 385cd658cd..22c7bc431c 100644 --- a/build/nw_ver.awk +++ b/build/nw_ver.awk @@ -35,13 +35,27 @@ BEGIN { ver_devbuild = $3; } } + + if (ver_devbuild) { + ver_dev = "-dev" + if (ARGV[2]) { + while ((getline < ARGV[2]) > 0) { + if (match ($0, /^\/repos\/asf\/!svn\/ver\/[0-9]+\/httpd\/httpd\/(trunk|branches\/[0-9]\.[0-9]\.x)$/)) { + gsub(/^\/repos\/asf\/!svn\/ver\/|\/httpd\/httpd\/(trunk|branches\/[0-9]\.[0-9]\.x)$/, "", $0) + ver_dev = svn_rev = "-r" $0 + } + } + } + } + ver_nlm = ver_major "," ver_minor "," ver_patch; - ver_str = ver_major "." ver_minor "." ver_patch (ver_devbuild ? "-dev" : ""); + 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 ""; }