git: 44b8b2a00d7e - main - Makefile.inc1: Avoid using release/Makefile for VERSION.

Bryan Drewery bdrewery at FreeBSD.org
Fri Jan 8 22:37:43 UTC 2021


The branch main has been updated by bdrewery:

URL: https://cgit.FreeBSD.org/src/commit/?id=44b8b2a00d7e2e98c83141a5c0e6b9b4e3c2ddb4

commit 44b8b2a00d7e2e98c83141a5c0e6b9b4e3c2ddb4
Author:     Bryan Drewery <bdrewery at FreeBSD.org>
AuthorDate: 2020-12-16 20:34:38 +0000
Commit:     Bryan Drewery <bdrewery at FreeBSD.org>
CommitDate: 2021-01-08 22:33:35 +0000

    Makefile.inc1: Avoid using release/Makefile for VERSION.
    
    release/Makefile.inc1 has git executions that were being ran for each of
    these lookups.  The results were not needed so just lookup what we want
    directly instead.
    
    Reviewed by:    gjb, rlibby, emaste (maybe)
    Sponsored by:   Dell EMC
    Differential Revision:  https://reviews.freebsd.org/D27643
---
 Makefile.inc1 | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/Makefile.inc1 b/Makefile.inc1
index c4e656c79ceb..5a9eff870dd5 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -540,14 +540,12 @@ OSRELDATE=	0
 .endif
 
 # Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION.
-.if !defined(_REVISION)
-_REVISION!=	${MAKE} -C ${SRCDIR}/release MK_AUTO_OBJ=no -V REVISION
-.export _REVISION
-.endif
-.if !defined(_BRANCH)
-_BRANCH!=	${MAKE} -C ${SRCDIR}/release MK_AUTO_OBJ=no -V BRANCH
-.export _BRANCH
+.for _V in BRANCH REVISION
+.if !defined(_${_V})
+_${_V}!=	eval $$(awk '/^${_V}=/{print}' ${SRCTOP}/sys/conf/newvers.sh); echo $$${_V}
+.export _${_V}
 .endif
+.endfor
 .if !defined(SRCRELDATE)
 SRCRELDATE!=	awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
 		${SRCDIR}/sys/sys/param.h


More information about the dev-commits-src-all mailing list