diff --git a/release/Makefile b/release/Makefile
index 6080898330b4..3379b81de584 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -317,20 +317,18 @@ install:
vm-base:
.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES)
- env IMAKE=${IMAKE} WORLDDIR=${WORLDDIR} \
- VMBASE=${VMBASE}.img VMSIZE=${VMSIZE} \
- DESTDIR=${.OBJDIR}/${.TARGET} \
- TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
- ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET}
+ env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
+ ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \
+ ${VMBASE}.img ${WORLDDIR} ${.OBJDIR}/${.TARGET} ${VMSIZE}
.endif
touch ${.TARGET}
vm-image: vm-base
.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES)
. for FORMAT in ${VMFORMATS}
- env FORMAT=${FORMAT} VMIMAGE=${VMBASE}.${FORMAT} VMBASE=${VMBASE}.img \
- TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
- ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET}
+ env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
+ ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \
+ ${VMBASE}.img ${FORMAT} ${VMBASE}.${FORMAT}
. endfor
.endif
touch ${.TARGET}
diff --git a/release/amd64/mk-vmimage.sh b/release/amd64/mk-vmimage.sh
index b717efd6390e..6ee148248cd5 100755
--- a/release/amd64/mk-vmimage.sh
+++ b/release/amd64/mk-vmimage.sh
@@ -35,8 +35,25 @@
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export PATH
+usage_vm_base() {
+ echo -n "$(basename ${0}) vm-base "
+ echo " "
+ return 0
+}
+
+usage_vm_image() {
+ echo -n "$(basename ${0}) vm-image "
+ echo "