aboutsummaryrefslogtreecommitdiff
path: root/release/Makefile.vm
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2014-11-05 13:22:19 +0000
committerGlen Barber <gjb@FreeBSD.org>2014-11-05 13:22:19 +0000
commit1e7c1f17428a0b342afd622fad341a389bed7a3f (patch)
tree6f87eab2bc67b1c4241bb8f9b509e3531dbbfb4f /release/Makefile.vm
parent21f93ded5aca3c7c2f41018ce2d700557f113779 (diff)
downloadsrc-1e7c1f17428a0b342afd622fad341a389bed7a3f.tar.gz
src-1e7c1f17428a0b342afd622fad341a389bed7a3f.zip
Notes
Diffstat (limited to 'release/Makefile.vm')
-rw-r--r--release/Makefile.vm41
1 files changed, 18 insertions, 23 deletions
diff --git a/release/Makefile.vm b/release/Makefile.vm
index 73042f72bf23..c37a4ad759d6 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -5,7 +5,7 @@
# Makefile for building virtual machine and cloud provider disk images.
#
-VMTARGETS= vm-base vm-image
+VMTARGETS= vm-image
VMFORMATS?= vhd vmdk qcow2 raw
VMSIZE?= 20G
VMBASE?= vm
@@ -37,23 +37,17 @@ CLEANFILES+= ${VMBASE}.${FORMAT}
. endfor
.endif
-vm-base:
-.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES)
-. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh)
- env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
- ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \
- ${VMBASE}.img ${WORLDDIR} ${.OBJDIR}/${.TARGET} ${VMSIZE}
-. endif
-.endif
- touch ${.TARGET}
+vm-base: vm-image
-vm-image: vm-base
+vm-image:
.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES)
. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh)
. for FORMAT in ${VMFORMATS}
env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
- ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \
- ${VMBASE}.img ${FORMAT} ${VMBASE}.${FORMAT}
+ ${.CURDIR}/${TARGET}/mk-vmimage.sh \
+ -C ${.CURDIR}/tools/vmimage.subr -d ${.TARGET} \
+ -i ${VMBASE}.img -s ${VMSIZE} -f ${FORMAT} \
+ -S ${WORLDDIR} -o ${VMBASE}.${FORMAT}
. endfor
. endif
.endif
@@ -62,20 +56,21 @@ vm-image: vm-base
vm-cloudware: ${CLOUDTARGETS}
vm-azure:
-.if exists(${.CURDIR}/${TARGET}/mk-azure.sh)
- env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} AZURECONF=${AZURECONF} \
- AZURE_FORMAT=${AZURE_FORMAT} \
- ${.CURDIR}/${TARGET}/mk-azure.sh ${.TARGET} azure.img \
- ${WORLDDIR} ${.TARGET} ${VMSIZE} ${AZUREIMAGE}
+.if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh)
+ env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
+ ${.CURDIR}/${TARGET}/mk-vmimage.sh \
+ -C ${.CURDIR}/tools/vmimage.subr -d ${.TARGET} \
+ -i azure.img -s ${VMSIZE} -f ${AZURE_FORMAT} \
+ -S ${WORLDDIR} -o ${AZUREIMAGE} -c ${AZURECONF}
.endif
touch ${.TARGET}
vm-openstack:
-.if exists(${.CURDIR}/${TARGET}/mk-openstack.sh)
+.if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh)
env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
- OPENSTACKCONF=${OPENSTACKCONF} \
- OPENSTACK_FORMAT=${OPENSTACK_FORMAT} \
- ${.CURDIR}/${TARGET}/mk-openstack.sh ${.TARGET} openstack.img \
- ${WORLDDIR} ${.TARGET} ${VMSIZE} ${OPENSTACKIMAGE}
+ ${.CURDIR}/${TARGET}/mk-vmimage.sh \
+ -C ${.CURDIR}/tools/vmimage.subr -d ${.TARGET} \
+ -i openstack.img -s ${VMSIZE} -f ${OPENSTACK_FORMAT} \
+ -S ${WORLDDIR} -o ${OPENSTACKIMAGE} -c ${OPENSTACKCONF}
.endif
touch ${.TARGET}