xref: /freebsd/release/Makefile (revision 32a4dda86d23b1fb730f395c73e5e0cd0a68de63)
197d92980SPeter Wemm# $FreeBSD$
20202c140SRodney W. Grimes#
312ad0bb1SNathan Whitehorn# Makefile for building releases and release media.
4bd668f6fSPoul-Henning Kamp#
512ad0bb1SNathan Whitehorn# User-driven targets:
68cec99b6SGlen Barber#  cdrom: Builds release CD-ROM media (disc1.iso)
75d27274aSGlen Barber#  dvdrom: Builds release DVD-ROM media (dvd1.iso)
83c334738SGlen Barber#  memstick: Builds memory stick image (memstick.img)
9a9da1707SGlen Barber#  mini-memstick: Builds minimal memory stick image (mini-memstick.img)
1012ad0bb1SNathan Whitehorn#  ftp: Sets up FTP distribution area (ftp)
114afe7cf5SGlen Barber#  release: Invokes real-release, vm-release, and cloudware-release targets
124afe7cf5SGlen Barber#  real-release: Build all media and FTP distribution area
134afe7cf5SGlen Barber#  vm-release: Build all virtual machine image targets
144afe7cf5SGlen Barber#  cloudware-release: Build all cloud hosting provider targets
152d4ff62fSGlen Barber#  install: Invokes the release-install and vm-install targets
162d4ff62fSGlen Barber#  release-install: Copies all release installation media into ${DESTDIR}
172d4ff62fSGlen Barber#  vm-install: Copies all virtual machine images into ${DESTDIR}
18bd668f6fSPoul-Henning Kamp#
1912ad0bb1SNathan Whitehorn# Variables affecting the build process:
2012ad0bb1SNathan Whitehorn#  WORLDDIR: location of src tree -- must have built world and default kernel
2112ad0bb1SNathan Whitehorn#            (by default, the directory above this one)
2212ad0bb1SNathan Whitehorn#  PORTSDIR: location of ports tree to distribute (default: /usr/ports)
2312ad0bb1SNathan Whitehorn#  DOCDIR:   location of doc tree (default: /usr/doc)
241b8a3e1dSDevin Teske#  XTRADIR:  xtra-bits-dir argument for <arch>/mkisoimages.sh
259d22cb2eSHiroki Sato#  NOPKG:    if set, do not distribute third-party packages
2612ad0bb1SNathan Whitehorn#  NOPORTS:  if set, do not distribute ports tree
2712ad0bb1SNathan Whitehorn#  NOSRC:    if set, do not distribute source tree
2812ad0bb1SNathan Whitehorn#  NODOC:    if set, do not generate release documentation
29f7f650c7SGlen Barber#  WITH_DVD: if set, generate dvd1.iso
3055af5cf1SGlen Barber#  WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1)
31cbc0e08aSGlen Barber#		(uncompressed images are not removed)
32a68d274bSGlen Barber#  WITH_VMIMAGES: if set, build virtual machine images with the release
33a9278c16SGlen Barber#  WITH_COMPRESSED_VMIMAGES: if set, compress virtual machine disk images
34a9278c16SGlen Barber#  		with xz(1) (extremely time consuming)
352d4ff62fSGlen Barber#  WITH_CLOUDWARE: if set, build cloud hosting disk images with the release
3612ad0bb1SNathan Whitehorn#  TARGET/TARGET_ARCH: architecture of built release
37b03ddec9SJohn Baldwin#
38ab0e9cdcSPoul-Henning Kamp
3912ad0bb1SNathan WhitehornWORLDDIR?=	${.CURDIR}/..
4012ad0bb1SNathan WhitehornPORTSDIR?=	/usr/ports
4112ad0bb1SNathan WhitehornDOCDIR?=	/usr/doc
4212ad0bb1SNathan WhitehornRELNOTES_LANG?= en_US.ISO8859-1
43fff8eb57SJohn Baldwin
44464485c8SHiroki Sato.if !defined(TARGET) || empty(TARGET)
45464485c8SHiroki SatoTARGET=		${MACHINE}
46464485c8SHiroki Sato.endif
47464485c8SHiroki Sato.if !defined(TARGET_ARCH) || empty(TARGET_ARCH)
480bd47e83SNathan Whitehorn.if ${TARGET} == ${MACHINE}
49464485c8SHiroki SatoTARGET_ARCH=	${MACHINE_ARCH}
508f1f55e9SRuslan Ermilov.else
51464485c8SHiroki SatoTARGET_ARCH=	${TARGET}
52464485c8SHiroki Sato.endif
538f1f55e9SRuslan Ermilov.endif
5412ad0bb1SNathan WhitehornIMAKE=		${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}
55876acefaSHiroki SatoDISTDIR=	dist
568f1f55e9SRuslan Ermilov
57de17cbccSHiroki Sato# Define OSRELEASE by using newvars.sh
58de17cbccSHiroki Sato.if !defined(OSRELEASE) || empty(OSRELEASE)
59de17cbccSHiroki Sato.for _V in TYPE BRANCH REVISION
60de17cbccSHiroki Sato${_V}!=	eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../sys/conf/newvers.sh); echo $$${_V}
61de17cbccSHiroki Sato.endfor
62de17cbccSHiroki Sato.for _V in ${TARGET_ARCH}
63de17cbccSHiroki Sato.if !empty(TARGET:M${_V})
64de17cbccSHiroki SatoOSRELEASE=	${TYPE}-${REVISION}-${BRANCH}-${TARGET}
65745ca085SGlen BarberVOLUME_LABEL=	${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET}
66de17cbccSHiroki Sato.else
67de17cbccSHiroki SatoOSRELEASE=	${TYPE}-${REVISION}-${BRANCH}-${TARGET}-${TARGET_ARCH}
68745ca085SGlen BarberVOLUME_LABEL=	${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH}
69de17cbccSHiroki Sato.endif
70de17cbccSHiroki Sato.endfor
71de17cbccSHiroki Sato.endif
72de17cbccSHiroki Sato
7369c7d069SGlen Barber.if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL)
7469c7d069SGlen BarberVOLUME_LABEL=	FreeBSD_Install
7569c7d069SGlen Barber.endif
76ac23f460SGlen Barber
7712ad0bb1SNathan Whitehorn.if !exists(${DOCDIR})
7812ad0bb1SNathan WhitehornNODOC= true
7912ad0bb1SNathan Whitehorn.endif
8012ad0bb1SNathan Whitehorn.if !exists(${PORTSDIR})
8112ad0bb1SNathan WhitehornNOPORTS= true
82dd1a1b3dSJoerg Wunsch.endif
83dd1a1b3dSJoerg Wunsch
8412ad0bb1SNathan WhitehornEXTRA_PACKAGES=
856daa108fSRuslan Ermilov.if !defined(NOPORTS)
8612ad0bb1SNathan WhitehornEXTRA_PACKAGES+= ports.txz
876daa108fSRuslan Ermilov.endif
884731faa3SJordan K. Hubbard.if !defined(NOSRC)
8912ad0bb1SNathan WhitehornEXTRA_PACKAGES+= src.txz
902e3a1557SKen Smith.endif
91a1b193b5SJohn Baldwin.if !defined(NODOC)
9212ad0bb1SNathan WhitehornEXTRA_PACKAGES+= reldoc
93b2200964SJohn Baldwin.endif
94b2200964SJohn Baldwin
9512ad0bb1SNathan WhitehornRELEASE_TARGETS= ftp
96876acefaSHiroki SatoIMAGES=
9712ad0bb1SNathan Whitehorn.if exists(${.CURDIR}/${TARGET}/mkisoimages.sh)
9812ad0bb1SNathan WhitehornRELEASE_TARGETS+= cdrom
998cec99b6SGlen BarberIMAGES+=	disc1.iso bootonly.iso
100d8824524SGlen Barber. if defined(WITH_DVD) && !empty(WITH_DVD)
101dc244562SGlen BarberRELEASE_TARGETS+= dvdrom
102dc244562SGlen BarberIMAGES+=	dvd1.iso
103dc244562SGlen Barber. endif
1046daa108fSRuslan Ermilov.endif
10512ad0bb1SNathan Whitehorn.if exists(${.CURDIR}/${TARGET}/make-memstick.sh)
1063c334738SGlen BarberRELEASE_TARGETS+= memstick.img
107a9da1707SGlen BarberRELEASE_TARGETS+= mini-memstick.img
1083c334738SGlen BarberIMAGES+=	memstick.img
109a9da1707SGlen BarberIMAGES+=	mini-memstick.img
110e738d1eaSJohn Baldwin.endif
111e738d1eaSJohn Baldwin
112a55e34ebSGlen BarberCLEANFILES=	packagesystem *.txz MANIFEST release ${IMAGES}
1130c535991SGlen Barber.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES)
1140c535991SGlen Barber. for I in ${IMAGES}
11555af5cf1SGlen BarberCLEANFILES+=	${I}.xz
1160c535991SGlen Barber. endfor
1170c535991SGlen Barber.endif
118cd15d7f3SGlen Barber.if defined(WITH_DVD) && !empty(WITH_DVD)
119cd15d7f3SGlen BarberCLEANFILES+=	pkg-stage
120cd15d7f3SGlen Barber.endif
121a55e34ebSGlen BarberCLEANDIRS=	dist ftp disc1 bootonly dvd
12246b13263SHiroki Satobeforeclean:
12346b13263SHiroki Sato	chflags -R noschg .
1248eb4e096SRuslan Ermilov.include <bsd.obj.mk>
12546b13263SHiroki Satoclean: beforeclean
12612ad0bb1SNathan Whitehorn
12712ad0bb1SNathan Whitehornbase.txz:
128876acefaSHiroki Sato	mkdir -p ${DISTDIR}
129876acefaSHiroki Sato	cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR}
13012ad0bb1SNathan Whitehorn# Set up mergemaster root database
131672d7ddbSSean Bruno	sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \
132876acefaSHiroki Sato	    "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${.OBJDIR}/${DISTDIR}/base"
133e9120a25SGlen Barber	etcupdate extract -B -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \
134d6d73d47SJohn Hay	    -s ${WORLDDIR} -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate"
135bfc3bab8SNathan Whitehorn# Package all components
136876acefaSHiroki Sato	cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR}
137876acefaSHiroki Sato	mv ${DISTDIR}/*.txz .
13812ad0bb1SNathan Whitehorn
13912ad0bb1SNathan Whitehornkernel.txz:
140876acefaSHiroki Sato	mkdir -p ${DISTDIR}
141876acefaSHiroki Sato	cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${.OBJDIR}/${DISTDIR}
142876acefaSHiroki Sato	mv ${DISTDIR}/kernel*.txz .
14312ad0bb1SNathan Whitehorn
14412ad0bb1SNathan Whitehornsrc.txz:
145876acefaSHiroki Sato	mkdir -p ${DISTDIR}/usr
14612ad0bb1SNathan Whitehorn	ln -fs ${WORLDDIR} ${DISTDIR}/usr/src
147bd9cab6fSRui Paulo	cd ${DISTDIR} && tar cLvf - --exclude .svn --exclude .zfs \
148bd9cab6fSRui Paulo	    --exclude .git --exclude @ --exclude usr/src/release/dist usr/src | \
149bd9cab6fSRui Paulo	    ${XZ_CMD} > ${.OBJDIR}/src.txz
15012ad0bb1SNathan Whitehorn
15112ad0bb1SNathan Whitehornports.txz:
152876acefaSHiroki Sato	mkdir -p ${DISTDIR}/usr
15312ad0bb1SNathan Whitehorn	ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports
154bd9cab6fSRui Paulo	cd ${DISTDIR} && tar cLvf - \
15523659c9dSGlen Barber	    --exclude .git --exclude .svn \
15612ad0bb1SNathan Whitehorn	    --exclude usr/ports/distfiles --exclude usr/ports/packages \
157bd9cab6fSRui Paulo	    --exclude 'usr/ports/INDEX*' --exclude work usr/ports | \
158bd9cab6fSRui Paulo	    ${XZ_CMD} > ${.OBJDIR}/ports.txz
15912ad0bb1SNathan Whitehorn
16012ad0bb1SNathan Whitehornreldoc:
16112ad0bb1SNathan Whitehorn	cd ${.CURDIR}/doc && ${MAKE} all install clean 'FORMATS=html txt' \
16212ad0bb1SNathan Whitehorn	    INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc
163876acefaSHiroki Sato	mkdir -p reldoc
16412ad0bb1SNathan Whitehorn.for i in hardware readme relnotes errata
16553089271STijl Coosemans	ln -f rdoc/${RELNOTES_LANG}/${i}/article.txt reldoc/${i:tu}.TXT
16653089271STijl Coosemans	ln -f rdoc/${RELNOTES_LANG}/${i}/article.html reldoc/${i:tu}.HTM
16712ad0bb1SNathan Whitehorn.endfor
168876acefaSHiroki Sato	cp rdoc/${RELNOTES_LANG}/readme/docbook.css reldoc
16912ad0bb1SNathan Whitehorn
170a55e34ebSGlen Barberdisc1: packagesystem
17112ad0bb1SNathan Whitehorn# Install system
172a55e34ebSGlen Barber	mkdir -p ${.TARGET}
1736e352319SNathan Whitehorn	cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \
174a55e34ebSGlen Barber		DESTDIR=${.OBJDIR}/${.TARGET} MK_RESCUE=no MK_KERNEL_SYMBOLS=no \
175ffc6fb79SGlen Barber		MK_PROFILE=no MK_SENDMAIL=no MK_TESTS=no MK_LIB32=no \
176ffc6fb79SGlen Barber		MK_DEBUG_FILES=no
17712ad0bb1SNathan Whitehorn# Copy distfiles
178a55e34ebSGlen Barber	mkdir -p ${.TARGET}/usr/freebsd-dist
17988343186SGlen Barber	for dist in MANIFEST $$(ls *.txz | grep -vE -- '(base|lib32)-dbg'); \
180a55e34ebSGlen Barber	    do cp $${dist} ${.TARGET}/usr/freebsd-dist; \
181ffc6fb79SGlen Barber	done
18212ad0bb1SNathan Whitehorn# Copy documentation, if generated
18312ad0bb1SNathan Whitehorn.if !defined(NODOC)
184a55e34ebSGlen Barber	cp reldoc/* ${.TARGET}
18512ad0bb1SNathan Whitehorn.endif
18612ad0bb1SNathan Whitehorn# Set up installation environment
187a55e34ebSGlen Barber	ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
188a55e34ebSGlen Barber	echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
189a55e34ebSGlen Barber	echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf
190a55e34ebSGlen Barber	echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf
191a55e34ebSGlen Barber	echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf
192a55e34ebSGlen Barber	cp ${.CURDIR}/rc.local ${.TARGET}/etc
193876acefaSHiroki Sato	touch ${.TARGET}
19412ad0bb1SNathan Whitehorn
19546c413feSNathan Whitehornbootonly: packagesystem
19646c413feSNathan Whitehorn# Install system
197a55e34ebSGlen Barber	mkdir -p ${.TARGET}
19846c413feSNathan Whitehorn	cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \
199a55e34ebSGlen Barber	    DESTDIR=${.OBJDIR}/${.TARGET} MK_AMD=no MK_AT=no \
200ba7bd912SGlen Barber	    MK_GAMES=no MK_GROFF=no \
201ba7bd912SGlen Barber	    MK_INSTALLLIB=no MK_LIB32=no MK_MAIL=no \
202ba7bd912SGlen Barber	    MK_NCP=no MK_TOOLCHAIN=no MK_PROFILE=no \
20301d57ec0SBryan Drewery	    MK_RESCUE=no MK_DICT=no \
204ffc6fb79SGlen Barber	    MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no
20546c413feSNathan Whitehorn# Copy manifest only (no distfiles) to get checksums
206a55e34ebSGlen Barber	mkdir -p ${.TARGET}/usr/freebsd-dist
207a55e34ebSGlen Barber	cp MANIFEST ${.TARGET}/usr/freebsd-dist
20846c413feSNathan Whitehorn# Copy documentation, if generated
20946c413feSNathan Whitehorn.if !defined(NODOC)
210a55e34ebSGlen Barber	cp reldoc/* ${.TARGET}
21146c413feSNathan Whitehorn.endif
21246c413feSNathan Whitehorn# Set up installation environment
213a55e34ebSGlen Barber	ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
214a55e34ebSGlen Barber	echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
215a55e34ebSGlen Barber	echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf
216a55e34ebSGlen Barber	echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf
217a55e34ebSGlen Barber	echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf
218a55e34ebSGlen Barber	cp ${.CURDIR}/rc.local ${.TARGET}/etc
21946c413feSNathan Whitehorn
220a55e34ebSGlen Barberdvd: packagesystem
221dc244562SGlen Barber# Install system
222dc244562SGlen Barber	mkdir -p ${.TARGET}
223dc244562SGlen Barber	cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \
224ba7bd912SGlen Barber		DESTDIR=${.OBJDIR}/${.TARGET} MK_RESCUE=no MK_KERNEL_SYMBOLS=no \
225ffc6fb79SGlen Barber		MK_TESTS=no MK_DEBUG_FILES=no
226dc244562SGlen Barber# Copy distfiles
227dc244562SGlen Barber	mkdir -p ${.TARGET}/usr/freebsd-dist
22888343186SGlen Barber	for dist in MANIFEST $$(ls *.txz | grep -v -- '(base|lib32)-dbg'); \
229ffc6fb79SGlen Barber	    do cp $${dist} ${.TARGET}/usr/freebsd-dist; \
230ffc6fb79SGlen Barber	done
231dc244562SGlen Barber# Copy documentation, if generated
232dc244562SGlen Barber.if !defined(NODOC)
233dc244562SGlen Barber	cp reldoc/* ${.TARGET}
234dc244562SGlen Barber.endif
235dc244562SGlen Barber# Set up installation environment
236dc244562SGlen Barber	ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
237dc244562SGlen Barber	echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
238dc244562SGlen Barber	echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf
23973e46dbaSGlen Barber	echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf
2407f100614SGlen Barber	echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf
241dc244562SGlen Barber	cp ${.CURDIR}/rc.local ${.TARGET}/etc
242dc244562SGlen Barber	touch ${.TARGET}
243dc244562SGlen Barber
2448cec99b6SGlen Barberrelease.iso: disc1.iso
245a55e34ebSGlen Barberdisc1.iso: disc1
2461b8a3e1dSDevin Teske	sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} disc1 ${XTRADIR}
24712ad0bb1SNathan Whitehorn
248dc244562SGlen Barberdvd1.iso: dvd pkg-stage
2491b8a3e1dSDevin Teske	sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ${.TARGET} dvd ${XTRADIR}
250dc244562SGlen Barber
25146c413feSNathan Whitehornbootonly.iso: bootonly
2521b8a3e1dSDevin Teske	sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ${.TARGET} bootonly ${XTRADIR}
25346c413feSNathan Whitehorn
254cb95a96bSGlen Barbermemstick: memstick.img
255a55e34ebSGlen Barbermemstick.img: disc1
256a55e34ebSGlen Barber	sh ${.CURDIR}/${TARGET}/make-memstick.sh disc1 ${.TARGET}
25712ad0bb1SNathan Whitehorn
258a9da1707SGlen Barbermini-memstick: mini-memstick.img
259a55e34ebSGlen Barbermini-memstick.img: bootonly
260a9da1707SGlen Barber	sh ${.CURDIR}/${TARGET}/make-memstick.sh bootonly ${.TARGET}
261a9da1707SGlen Barber
26212ad0bb1SNathan Whitehornpackagesystem: base.txz kernel.txz ${EXTRA_PACKAGES}
263876acefaSHiroki Sato	sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST
264299a8b95SNathan Whitehorn	touch ${.TARGET}
26512ad0bb1SNathan Whitehorn
266dc244562SGlen Barberpkg-stage:
2676f50c4eaSGlen Barber.if !defined(NOPKG)
2686f50c4eaSGlen Barber	env REPOS_DIR=${.CURDIR}/pkg_repos/ \
2696f50c4eaSGlen Barber		sh ${.CURDIR}/scripts/pkg-stage.sh
2700d0e89b7SGlen Barber	mkdir -p ${.OBJDIR}/dvd/packages/repos/
2710d0e89b7SGlen Barber	cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \
2720d0e89b7SGlen Barber		${.OBJDIR}/dvd/packages/repos/
273dc244562SGlen Barber.endif
2740d0e89b7SGlen Barber	touch ${.TARGET}
275dc244562SGlen Barber
2768cec99b6SGlen Barbercdrom: disc1.iso bootonly.iso
277dc244562SGlen Barberdvdrom: dvd1.iso
27812ad0bb1SNathan Whitehornftp: packagesystem
279299a8b95SNathan Whitehorn	rm -rf ftp
280876acefaSHiroki Sato	mkdir -p ftp
281299a8b95SNathan Whitehorn	cp *.txz MANIFEST ftp
28212ad0bb1SNathan Whitehorn
2834afe7cf5SGlen Barberrelease:	real-release vm-release cloudware-release
284fdbd473cSGlen Barber	${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done
285fdbd473cSGlen Barber	true
286fdbd473cSGlen Barber
287fdbd473cSGlen Barberrelease-done:
288fdbd473cSGlen Barber	touch release
2894afe7cf5SGlen Barber
2904afe7cf5SGlen Barberreal-release:
2910bd47e83SNathan Whitehorn	${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj
2920bd47e83SNathan Whitehorn	${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS}
29312ad0bb1SNathan Whitehorn
294*32a4dda8SGlen Barberinstall:	release-install vm-install
2952d4ff62fSGlen Barber
2962d4ff62fSGlen Barberrelease-install:
297876acefaSHiroki Sato.if defined(DESTDIR) && !empty(DESTDIR)
298876acefaSHiroki Sato	mkdir -p ${DESTDIR}
299876acefaSHiroki Sato.endif
300de17cbccSHiroki Sato	cp -a ftp ${DESTDIR}/
301de17cbccSHiroki Sato.for I in ${IMAGES}
302de17cbccSHiroki Sato	cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I}
303510f3303SGlen Barber. if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES)
304bd9cab6fSRui Paulo	${XZ_CMD} -k ${DESTDIR}/${OSRELEASE}-${I}
305cbc0e08aSGlen Barber. endif
306de17cbccSHiroki Sato.endfor
30734187a08SGlen Barber	cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512
308de17cbccSHiroki Sato	cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256
309a68d274bSGlen Barber
3106513e474SGlen Barber.include "${.CURDIR}/Makefile.vm"
311