xref: /dragonfly/nrelease/Makefile (revision acc392b5)
1*acc392b5SJoerg Sonnenberger# $DragonFly: src/nrelease/Makefile,v 1.7 2004/02/11 11:11:24 joerg 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
9*acc392b5SJoerg SonnenbergerWORLD_CCVER ?= ${CCVER}
10*acc392b5SJoerg SonnenbergerKERNEL_CCVER ?= ${CCVER}
11*acc392b5SJoerg Sonnenberger
1217d0fefeSMatthew Dillonrelease:	check clean buildworld1 buildkernel1 buildiso mkiso
136ca9a59cSMatthew Dillon
1417d0fefeSMatthew Dillonquickrel:	check clean buildworld2 buildkernel2 buildiso mkiso
156ca9a59cSMatthew Dillon
1617d0fefeSMatthew Dillonrealquickrel:	check clean buildiso mkiso
176ca9a59cSMatthew Dillon
1817d0fefeSMatthew Dilloncheck:
1917d0fefeSMatthew Dillon	if [ ! -f /usr/local/bin/mkisofs ]; then \
2017d0fefeSMatthew Dillon		echo "You need to install the mkisofs port for this target"; \
2117d0fefeSMatthew Dillon		exit 1; fi
2217d0fefeSMatthew Dillon	if [ ! -f /usr/local/bin/cvsup ]; then \
2317d0fefeSMatthew Dillon		echo "You need to install the cvsup port for this target"; \
2417d0fefeSMatthew Dillon		exit 1; fi
256ca9a59cSMatthew Dillon
266ca9a59cSMatthew Dillonbuildworld1:
27*acc392b5SJoerg Sonnenberger	( cd ${.CURDIR}/..; make buildworld CCVER=${WORLD_CCVER} )
286ca9a59cSMatthew Dillon
296ca9a59cSMatthew Dillonbuildworld2:
30*acc392b5SJoerg Sonnenberger	( cd ${.CURDIR}/..; make -DNOTOOLS -DNOCLEAN buildworld CCVER=${WORLD_CCVER} )
316ca9a59cSMatthew Dillon
326ca9a59cSMatthew Dillonbuildkernel1:
33*acc392b5SJoerg Sonnenberger	( cd ${.CURDIR}/..; make buildkernel KERNCONF=${KERNCONF} CCVER=${KERNEL_CCVER} )
346ca9a59cSMatthew Dillon
356ca9a59cSMatthew Dillonbuildkernel2:
36*acc392b5SJoerg Sonnenberger	( cd ${.CURDIR}/..; make -DNOCLEAN buildkernel KERNCONF=${KERNCONF} CCVER=${KERNEL_CCVER} )
376ca9a59cSMatthew Dillon
386ca9a59cSMatthew Dillonbuildiso:
396ca9a59cSMatthew Dillon	if [ ! -d ${ISOROOT} ]; then mkdir -p ${ISOROOT}; fi
406ca9a59cSMatthew Dillon	( cd ${.CURDIR}/..; make DESTDIR=${ISOROOT} installworld )
416ca9a59cSMatthew Dillon	( cd ${.CURDIR}/../etc; make DESTDIR=${ISOROOT} distribution )
426ca9a59cSMatthew Dillon	cpdup -X cpignore -o ${.CURDIR}/root ${ISOROOT} -vv
436ca9a59cSMatthew Dillon	( cd ${.CURDIR}/..; make DESTDIR=${ISOROOT} \
446ca9a59cSMatthew Dillon		installkernel KERNCONF=${KERNCONF} )
456ca9a59cSMatthew Dillon	mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.local.dist -p ${ISOROOT}/usr/local/
466ca9a59cSMatthew Dillon	mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.var.dist -p ${ISOROOT}/var
476ca9a59cSMatthew Dillon	dev_mkdb -f ${ISOROOT}/var/run/dev.db ${ISOROOT}/dev
481d92043bSMatthew Dillon	cp /usr/local/bin/mkisofs ${ISOROOT}/usr/local/bin
496ca9a59cSMatthew Dillon	cp /usr/local/man/man8/mkisofs.8.gz ${ISOROOT}/usr/local/man/man8
501d92043bSMatthew Dillon	cp /usr/local/bin/cvsup ${ISOROOT}/usr/local/bin
516ca9a59cSMatthew Dillon	cp /usr/local/man/man1/cvsup.1.gz ${ISOROOT}/usr/local/man/man1
526ca9a59cSMatthew Dillon
536ca9a59cSMatthew Dillonmkiso:
546ca9a59cSMatthew Dillon	( cd ${ISOROOT}; mkisofs -b boot/cdboot -no-emul-boot \
55382f1ee3SMatthew Dillon		-R -J -V DragonFly -o ${ISOFILE} . )
566ca9a59cSMatthew Dillon
576ca9a59cSMatthew Dillonclean:
586ca9a59cSMatthew Dillon	if [ -d ${ISOROOT} ]; then chflags -R noschg ${ISOROOT}; fi
596ca9a59cSMatthew Dillon	if [ -d ${ISOROOT} ]; then rm -rf ${ISOROOT}; fi
606ca9a59cSMatthew Dillon
616ca9a59cSMatthew Dillonrealclean:	clean
623ebedc5eSMatthew Dillon	rm -rf ${OBJSYS}/${KERNCONF}
636ca9a59cSMatthew Dillon
646ca9a59cSMatthew Dillon.include <bsd.prog.mk>
65