aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2014-10-29 15:52:17 +0000
committerGlen Barber <gjb@FreeBSD.org>2014-10-29 15:52:17 +0000
commitd08ce983a7bbe104dfc78c920a86985ae2fd60cc (patch)
tree49597d7cc660d7d1da76c6c0df385b099df37e7d
parent6513e474ac5b1450691119b31343805f1d1266fc (diff)
downloadsrc-d08ce983a7bbe104dfc78c920a86985ae2fd60cc.tar.gz
src-d08ce983a7bbe104dfc78c920a86985ae2fd60cc.zip
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
Notes
Notes: svn path=/projects/release-vmimage/; revision=273824
-rw-r--r--release/Makefile3
-rw-r--r--release/Makefile.vm24
2 files changed, 19 insertions, 8 deletions
diff --git a/release/Makefile b/release/Makefile
index 5c425e48f0af..5edd4d0f4f68 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 1d1f64223f53..82eb7d4ece45 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)