From 312c939c86a5d14589ab78630e9aff85d0e79cdb Mon Sep 17 00:00:00 2001 From: gjb Date: Wed, 29 Oct 2014 15:52:17 +0000 Subject: Add glue to allow enabling building cloud provider VM images by default. When WITH_CLOUDWARE is not empty, add CLOUDTARGETS to the release/Makefile 'release' target. CLOUDTARGETS is generated from the contents of CLOUDWARE, which should be a list of all supported target providers. Sponsored by: The FreeBSD Foundation --- release/Makefile | 3 +++ release/Makefile.vm | 24 ++++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) (limited to 'release') diff --git a/release/Makefile b/release/Makefile index 5c425e4..5edd4d0 100644 --- a/release/Makefile +++ b/release/Makefile @@ -269,6 +269,9 @@ release: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${VMTARGETS} .endif +.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) + ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${CLOUDTARGETS} +.endif install: .if defined(DESTDIR) && !empty(DESTDIR) diff --git a/release/Makefile.vm b/release/Makefile.vm index 1d1f642..82eb7d4 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -9,7 +9,22 @@ VMTARGETS= vm-base vm-image VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 20G VMBASE?= vm -AZURECONF?= ${.CURDIR}/tools/azure.conf + +CLOUDWARE?= AZURE +AZURE_FORMAT= vhd + +.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) +. for _CW in ${CLOUDWARE} +CLOUDTARGETS+= vm-${_CW:tl} +CLEANDIRS+= vm-${_CW:tl} +CLEANFILES+= ${_CW:tl}.img \ + ${_CW:tl}.${${_CW:tu}_FORMAT} \ + ${_CW:tl}.${${_CW:tu}_FORMAT}.raw +. if exists(${.CURDIR}/tools/${_CW:tl}.conf) && !defined(${_CW:tu}CONF) +${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf +. endif +. endfor +.endif .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) CLEANDIRS+= ${VMTARGETS} @@ -19,13 +34,6 @@ CLEANFILES+= ${VMBASE}.${FORMAT} . endfor .endif -.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) -CLEANFILES+= ${OSRELEASE}.vhd \ - ${OSRELEASE}.vhd.raw \ - azure.img -CLEANDIRS+= vm-azure -.endif - vm-base: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) . if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) -- cgit v1.1