diff options
author | Colin Percival <cperciva@FreeBSD.org> | 2023-12-03 21:39:30 +0000 |
---|---|---|
committer | Colin Percival <cperciva@FreeBSD.org> | 2023-12-03 21:39:30 +0000 |
commit | 7d0ee5ebd052d35e323f2d303e467c2cf305ca39 (patch) | |
tree | 43bde5784a75c77b987868e22acc2cb376d2364d /release | |
parent | 35a301555bff2ac27a727c10641b7efb3f162988 (diff) | |
download | src-7d0ee5ebd052d35e323f2d303e467c2cf305ca39.tar.gz src-7d0ee5ebd052d35e323f2d303e467c2cf305ca39.zip |
release/Makefile.vm: Rework emulator-portinstall
The emulator-portinstall target now unconditionally ensures that qemu
is installed; but is only invoked if needed (aka. when cross building
VM images).
MFC After: 3 days
MFC With: 97bd53ef4d20 ("Fix duplicate rc.conf files")
Diffstat (limited to 'release')
-rw-r--r-- | release/Makefile.vm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/release/Makefile.vm b/release/Makefile.vm index a7624775d48c..58703de16cf3 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -69,8 +69,6 @@ ${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../sys/conf/newvers.sh); echo .endfor emulator-portinstall: -.if ${TARGET_ARCH} != ${MACHINE_ARCH} -.if ( ${TARGET_ARCH} != "i386" ) || ( ${MACHINE_ARCH} != "amd64" ) .if !exists(/usr/local/bin/qemu-${TARGET_ARCH}-static) .if exists(${PORTSDIR}/emulators/qemu-user-static/Makefile) env - UNAME_r=${UNAME_r} PATH=$$PATH make -C ${PORTSDIR}/emulators/qemu-user-static BATCH=1 all install clean @@ -83,9 +81,13 @@ emulator-portinstall: .endif touch ${.TARGET} +.if ${TARGET_ARCH} != ${MACHINE_ARCH} +.if ( ${TARGET_ARCH} != "i386" ) || ( ${MACHINE_ARCH} != "amd64" ) QEMUSTATIC=/usr/local/bin/qemu-${TARGET_ARCH}-static +QEMUTGT=emulator-portinstall .endif .endif +QEMUTGT?= .if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) . for _CW in ${CLOUDWARE} @@ -100,7 +102,7 @@ CLEANFILES+= ${_CW:tl}.${_FS}.img \ ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT}.raw ${_CW:tu}${_FS:tu}IMAGE= ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT} -cw-${_CW:tl}-${_FS}: emulator-portinstall +cw-${_CW:tl}-${_FS}: ${QEMUTGT} mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ QEMUSTATIC=${QEMUSTATIC} \ |