Index: Makefile.inc1 =================================================================== --- Makefile.inc1 +++ Makefile.inc1 @@ -553,23 +553,25 @@ .endif .if !defined(PKG_VERSION) -.if ${_BRANCH:MSTABLE*} || ${_BRANCH:MCURRENT*} -TIMENOW= %Y%m%d%H%M%S -EXTRA_REVISION= .s${TIMENOW:gmtime} +_STRTIMENOW= %Y%m%d%H%M%S +_TIMENOW= ${_STRTIMENOW:gmtime} +.if ${_BRANCH:MCURRENT*} +EXTRA_REVISION= .s${_TIMENOW} +.elif ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*} +EXTRA_REVISION= s${_TIMENOW} .elif ${_BRANCH:MALPHA*} -EXTRA_REVISION= _${_BRANCH:C/-ALPHA/.a/} +EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/} .elif ${_BRANCH:MBETA*} -EXTRA_REVISION= _${_BRANCH:C/-BETA/.b/} +EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/} .elif ${_BRANCH:MRC*} -EXTRA_REVISION= _${_BRANCH:C/-RC/.r/} -.elif ${_BRANCH:MPRERELEASE*} -EXTRA_REVISION= _${_BRANCH:C/-PRERELEASE/.p/} -.elif ${_BRANCH:M*-p*} -EXTRA_REVISION= _${_BRANCH:C/.*-p([0-9]+$)/\1/} +EXTRA_REVISION= .r${_BRANCH:C/RC([0-9]+).*/\1/} .endif -PKG_VERSION= ${_REVISION}${EXTRA_REVISION} +.if ${_BRANCH:M*-p*} +EXTRA_REVISION+= _${_BRANCH:C/.*-p([0-9]+$)/\1/} .endif -.endif # !defined(PKG_VERSION) +PKG_VERSION= ${_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} +.endif +.endif # !defined(_MKSHOWCONFIG) .if !defined(_MKSHOWCONFIG) _CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \