git: aaa4cd7f3c93 - main - Makefile.inc1: Silence an error in make packages

From: Juraj Lutter <otis_at_FreeBSD.org>
Date: Tue, 30 Nov 2021 08:57:06 UTC
The branch main has been updated by otis (ports committer):

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

commit aaa4cd7f3c933950582dfb4f0eac23a200dafe53
Author:     Juraj Lutter <otis@FreeBSD.org>
AuthorDate: 2021-11-28 20:44:13 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2021-11-30 08:53:20 +0000

    Makefile.inc1: Silence an error in make packages
    
    Silence an error in "packages" target, like:
    
    eval: /usr/src: Permission denied
    
    on systems without subversion present.
    
    Reviewed by:    emaste
    Approved by:    emaste
    MFC after:      1 week
    Differential Revision: https://reviews.freebsd.org/D33153
---
 Makefile.inc1 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile.inc1 b/Makefile.inc1
index e3b46b3e40bc..f0d0483e41d4 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -503,11 +503,13 @@ SVNVERSION_CMD?=${_D}/svnliteversion
 .  endif
 . endfor
 .endif
+.if defined(SVNVERSION_CMD) && !empty(SVNVERSION_CMD)
 _VCS_REVISION?=	$$(eval ${SVNVERSION_CMD} ${SRCDIR})
 . if !empty(_VCS_REVISION)
 VCS_REVISION=	$$(echo r${_VCS_REVISION})
-. endif
 .export VCS_REVISION
+. endif
+.endif
 .endif
 
 .if !defined(GIT_CMD) || empty(GIT_CMD)