From: cmaj Date: Thu, 6 Aug 2020 17:51:10 +0000 (-0600) Subject: Makefile: Fix certified version numbers X-Git-Tag: 17.7.0-rc1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a96c52c0c283145776505b649a9a2ed05bb956f;p=thirdparty%2Fasterisk.git Makefile: Fix certified version numbers Adds sed before awk to produce reasonable ASTERISKVERSIONNUM on certified versions of Asterisk eg. 16.8-cert3 is 160803 instead of the previous 00800. ASTERISK-29021 #close Change-Id: Icf241df0ff6db09011b8c936a317a84b0b634e16 --- diff --git a/Makefile b/Makefile index d2b17fff48..591f6a9d88 100644 --- a/Makefile +++ b/Makefile @@ -249,7 +249,7 @@ else endif ifneq ($(AWK),) ifneq ($(wildcard .version),) - ASTERISKVERSIONNUM:=$(shell $(AWK) -F. '{printf "%01d%02d%02d", $$1, $$2, $$3}' .version) + ASTERISKVERSIONNUM:=$(shell $(SED) -e 's/^certified\///' -e 's/-cert/./' .version | $(AWK) -F. '{printf "%01d%02d%02d", $$1, $$2, $$3}') endif endif