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
@@ -1,21 +1,23 @@
PACKAGE= bhyve
FILESDIR= ${SHAREDIR}/bhyve/gdb
FILES+= target.xml
.if ${MACHINE_ARCH} == "amd64"
XMLARCH= i386:x86-64
FILES+= amd64.xml
.endif
+.if !make(install*)
target.xml: .PHONY
@echo "" > ${.TARGET}
@echo "" >> ${.TARGET}
@echo "" >> ${.TARGET}
@echo " ${XMLARCH}" >> ${.TARGET}
.for file in ${FILES:Ntarget.xml}
@echo " " >> ${.TARGET}
.endfor
@echo "" >> ${.TARGET}
+.endif
.include