xref: /dragonfly/nrelease/Makefile (revision 382f1ee3)
1*382f1ee3SMatthew Dillon# $DragonFly: src/nrelease/Makefile,v 1.5 2003/12/01 20:12:39 dillon Exp $
26ca9a59cSMatthew Dillon#
36ca9a59cSMatthew DillonISODIR ?= /usr/release
46ca9a59cSMatthew DillonISOFILE ?= ${ISODIR}/dfly.iso
56ca9a59cSMatthew DillonISOROOT = ${ISODIR}/root
66ca9a59cSMatthew DillonOBJSYS= ${.OBJDIR}/../sys
76ca9a59cSMatthew DillonKERNCONF ?= GENERIC
86ca9a59cSMatthew Dillon
917d0fefeSMatthew Dillonrelease:	check clean buildworld1 buildkernel1 buildiso mkiso
106ca9a59cSMatthew Dillon
1117d0fefeSMatthew Dillonquickrel:	check clean buildworld2 buildkernel2 buildiso mkiso
126ca9a59cSMatthew Dillon
1317d0fefeSMatthew Dillonrealquickrel:	check clean buildiso mkiso
146ca9a59cSMatthew Dillon
1517d0fefeSMatthew Dilloncheck:
1617d0fefeSMatthew Dillon	if [ ! -f /usr/local/bin/mkisofs ]; then \
1717d0fefeSMatthew Dillon		echo "You need to install the mkisofs port for this target"; \
1817d0fefeSMatthew Dillon		exit 1; fi
1917d0fefeSMatthew Dillon	if [ ! -f /usr/local/bin/cvsup ]; then \
2017d0fefeSMatthew Dillon		echo "You need to install the cvsup port for this target"; \
2117d0fefeSMatthew Dillon		exit 1; fi
226ca9a59cSMatthew Dillon
236ca9a59cSMatthew Dillonbuildworld1:
246ca9a59cSMatthew Dillon	( cd ${.CURDIR}/..; make buildworld )
256ca9a59cSMatthew Dillon
266ca9a59cSMatthew Dillonbuildworld2:
276ca9a59cSMatthew Dillon	( cd ${.CURDIR}/..; make -DNOTOOLS -DNOCLEAN buildworld )
286ca9a59cSMatthew Dillon
296ca9a59cSMatthew Dillonbuildkernel1:
306ca9a59cSMatthew Dillon	( cd ${.CURDIR}/..; make buildkernel KERNCONF=${KERNCONF} )
316ca9a59cSMatthew Dillon
326ca9a59cSMatthew Dillonbuildkernel2:
336ca9a59cSMatthew Dillon	( cd ${.CURDIR}/..; make -DNOCLEAN buildkernel KERNCONF=${KERNCONF} )
346ca9a59cSMatthew Dillon
356ca9a59cSMatthew Dillonbuildiso:
366ca9a59cSMatthew Dillon	if [ ! -d ${ISOROOT} ]; then mkdir -p ${ISOROOT}; fi
376ca9a59cSMatthew Dillon	( cd ${.CURDIR}/..; make DESTDIR=${ISOROOT} installworld )
386ca9a59cSMatthew Dillon	( cd ${.CURDIR}/../etc; make DESTDIR=${ISOROOT} distribution )
396ca9a59cSMatthew Dillon	cpdup -X cpignore -o ${.CURDIR}/root ${ISOROOT} -vv
406ca9a59cSMatthew Dillon	( cd ${.CURDIR}/..; make DESTDIR=${ISOROOT} \
416ca9a59cSMatthew Dillon		installkernel KERNCONF=${KERNCONF} )
426ca9a59cSMatthew Dillon	mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.local.dist -p ${ISOROOT}/usr/local/
436ca9a59cSMatthew Dillon	mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.var.dist -p ${ISOROOT}/var
446ca9a59cSMatthew Dillon	dev_mkdb -f ${ISOROOT}/var/run/dev.db ${ISOROOT}/dev
451d92043bSMatthew Dillon	cp /usr/local/bin/mkisofs ${ISOROOT}/usr/local/bin
466ca9a59cSMatthew Dillon	cp /usr/local/man/man8/mkisofs.8.gz ${ISOROOT}/usr/local/man/man8
471d92043bSMatthew Dillon	cp /usr/local/bin/cvsup ${ISOROOT}/usr/local/bin
486ca9a59cSMatthew Dillon	cp /usr/local/man/man1/cvsup.1.gz ${ISOROOT}/usr/local/man/man1
496ca9a59cSMatthew Dillon
506ca9a59cSMatthew Dillonmkiso:
516ca9a59cSMatthew Dillon	( cd ${ISOROOT}; mkisofs -b boot/cdboot -no-emul-boot \
52*382f1ee3SMatthew Dillon		-R -J -V DragonFly -o ${ISOFILE} . )
536ca9a59cSMatthew Dillon
546ca9a59cSMatthew Dillonclean:
556ca9a59cSMatthew Dillon	if [ -d ${ISOROOT} ]; then chflags -R noschg ${ISOROOT}; fi
566ca9a59cSMatthew Dillon	if [ -d ${ISOROOT} ]; then rm -rf ${ISOROOT}; fi
576ca9a59cSMatthew Dillon
586ca9a59cSMatthew Dillonrealclean:	clean
596ca9a59cSMatthew Dillon	rm -rf ${OBJSYS}/GENERIC
606ca9a59cSMatthew Dillon
616ca9a59cSMatthew Dillon.include <bsd.prog.mk>
62