diff options
author | gjb <gjb@FreeBSD.org> | 2014-10-14 11:48:28 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2014-10-14 11:48:28 +0000 |
commit | d7ed1332f2785ea5f9d8f7924b2654aaf1dd486d (patch) | |
tree | bd0b4bce48415159b2de8d7f374291a5290afd73 /release/Makefile | |
parent | 19f69f6638358fab1003c1941d48aa451ceef292 (diff) | |
download | FreeBSD-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/Makefile | 15 |
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} |