summaryrefslogtreecommitdiffstats
path: root/release/Makefile
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2014-10-14 11:48:28 +0000
committergjb <gjb@FreeBSD.org>2014-10-14 11:48:28 +0000
commitd7ed1332f2785ea5f9d8f7924b2654aaf1dd486d (patch)
treebd0b4bce48415159b2de8d7f374291a5290afd73 /release/Makefile
parent19f69f6638358fab1003c1941d48aa451ceef292 (diff)
downloadFreeBSD-src-d7ed1332f2785ea5f9d8f7924b2654aaf1dd486d.zip
FreeBSD-src-d7ed1332f2785ea5f9d8f7924b2654aaf1dd486d.tar.gz
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
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 8a6ece7..8a517f8 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}
OpenPOWER on IntegriCloud