aboutsummaryrefslogtreecommitdiff
path: root/release/Makefile
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2014-10-14 11:48:28 +0000
committerGlen Barber <gjb@FreeBSD.org>2014-10-14 11:48:28 +0000
commit3991f309ede76bfe7493b8d9bf5c6d622fa05851 (patch)
treebd0b4bce48415159b2de8d7f374291a5290afd73 /release/Makefile
parent41a29c1ab299473db6127dbe4abb352c1fd40afb (diff)
downloadsrc-3991f309ede76bfe7493b8d9bf5c6d622fa05851.tar.gz
src-3991f309ede76bfe7493b8d9bf5c6d622fa05851.zip
Add a separate make(1) target to release/Makefile to
build FreeBSD virtual machine disk images for use on the Microsoft Azure service. For now, this target is not directly connected to the build, however can be manually invoked. The 'vm-azure' target invokes {amd64,i386}/mk-azure.sh, which does the heavy lifting to produce proper VHDs. mk-azure.sh uses a configuration file, defaulting to tools/azure.conf if otherwise unset. Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/projects/release-vmimage/; revision=273076
Diffstat (limited to 'release/Makefile')
-rw-r--r--release/Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/release/Makefile b/release/Makefile
index 8a6ece7d1b58..8a517f810243 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -101,6 +101,7 @@ VMTARGETS= vm-base vm-image
VMFORMATS?= vhd vmdk qcow2 raw
VMSIZE?= 20G
VMBASE?= vm
+AZURECONF?= ${.CURDIR}/tools/azure.conf
CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES}
.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES)
@@ -121,6 +122,12 @@ CLEANDIRS= dist ftp release bootonly dvd
.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES)
CLEANDIRS+= ${VMTARGETS}
.endif
+.if exists(${.CURDIR}/${TARGET}/mk-azure.sh)
+CLEANFILES+= ${OSRELEASE}.vhd \
+ ${OSRELEASE}.vhd.raw \
+ azure.img
+CLEANDIRS+= vm-azure
+.endif
beforeclean:
chflags -R noschg .
.include <bsd.obj.mk>
@@ -338,3 +345,11 @@ vm-image: vm-base
. endif
.endif
touch ${.TARGET}
+
+vm-azure:
+.if exists(${.CURDIR}/${TARGET}/mk-azure.sh)
+ env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} AZURECONF=${AZURECONF} \
+ ${.CURDIR}/${TARGET}/mk-azure.sh ${.TARGET} azure.img \
+ ${WORLDDIR} ${.TARGET} ${VMSIZE} ${OSRELEASE}.vhd
+.endif
+ touch ${.TARGET}