git: b41151b96de6 - stable/14 - bhyve/gdb: Avoid rebuilding target.xml for install targets

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Fri, 29 Mar 2024 18:11:52 UTC
The branch stable/14 has been updated by markj:

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

commit b41151b96de6fdab7b762dcf8d3f6640639c4bf3
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-03-07 05:39:07 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-03-29 13:53:05 +0000

    bhyve/gdb: Avoid rebuilding target.xml for install targets
    
    Otherwise it's impossible to install from a read-only objdir.
    
    Fixes:  f81cdf24ba54 ("bhyve: Add support for XML register definitions")
    Reported by:    olivier
    
    (cherry picked from commit 8a802df1de2d77fd0a62996bd785ca3f1326887f)
---
 usr.sbin/bhyve/gdb/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/usr.sbin/bhyve/gdb/Makefile b/usr.sbin/bhyve/gdb/Makefile
index a444b0cc4c69..cc9ba4d224da 100644
--- a/usr.sbin/bhyve/gdb/Makefile
+++ b/usr.sbin/bhyve/gdb/Makefile
@@ -8,6 +8,7 @@ XMLARCH=	i386:x86-64
 FILES+=		amd64.xml
 .endif
 
+.if !make(install*)
 target.xml: .PHONY
 	@echo "<?xml version=\"1.0\"?>" > ${.TARGET}
 	@echo "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">" >> ${.TARGET}
@@ -17,5 +18,6 @@ target.xml: .PHONY
 	@echo "  <xi:include href=\"${file}\"/>" >> ${.TARGET}
 .endfor
 	@echo "</target>" >> ${.TARGET}
+.endif
 
 .include <bsd.prog.mk>