1 # $DragonFly: src/nrelease/Makefile,v 1.8 2004/04/23 02:14:07 dillon Exp $
5 ISOFILE ?= ${ISODIR}/dfly.iso
6 ISOROOT = ${ISODIR}/root
7 OBJSYS= ${.OBJDIR}/../sys
10 # note: we use the '${NRLOBJDIR}/nrelease' construct, that is we add
11 # the additional '/nrelease' manually, as a safety measure.
15 WORLD_CCVER ?= ${CCVER}
16 KERNEL_CCVER ?= ${CCVER}
18 release: check clean buildworld1 buildkernel1 buildiso mkiso
20 quickrel: check clean buildworld2 buildkernel2 buildiso mkiso
22 realquickrel: check clean buildiso mkiso
25 if [ ! -f /usr/local/bin/mkisofs ]; then \
26 echo "You need to install the mkisofs port for this target"; \
28 if [ ! -f /usr/local/bin/cvsup ]; then \
29 echo "You need to install the cvsup port for this target"; \
33 ( cd ${.CURDIR}/..; make buildworld CCVER=${WORLD_CCVER} )
36 ( cd ${.CURDIR}/..; make -DNOTOOLS -DNOCLEAN buildworld CCVER=${WORLD_CCVER} )
39 ( cd ${.CURDIR}/..; make buildkernel KERNCONF=${KERNCONF} CCVER=${KERNEL_CCVER} )
42 ( cd ${.CURDIR}/..; make -DNOCLEAN buildkernel KERNCONF=${KERNCONF} CCVER=${KERNEL_CCVER} )
44 # note that we do not want to mess with any /usr/obj directories not related
45 # to buildworld, buildkernel, or nrelease, so we must supply the proper
46 # MAKEOBJDIRPREFIX for targets that are not run through the buildworld and
47 # buildkernel mechanism.
50 if [ ! -d ${ISOROOT} ]; then mkdir -p ${ISOROOT}; fi
51 if [ ! -d ${NRLOBJDIR}/nrelease ]; then mkdir -p ${NRLOBJDIR}/nrelease; fi
52 ( cd ${.CURDIR}/..; make DESTDIR=${ISOROOT} installworld )
53 ( cd ${.CURDIR}/../etc; MAKEOBJDIRPREFIX=${NRLOBJDIR}/nrelease make DESTDIR=${ISOROOT} distribution )
54 cpdup -X cpignore -o ${.CURDIR}/root ${ISOROOT} -vv
55 ( cd ${.CURDIR}/..; make DESTDIR=${ISOROOT} \
56 installkernel KERNCONF=${KERNCONF} )
57 mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.local.dist -p ${ISOROOT}/usr/local/
58 mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.var.dist -p ${ISOROOT}/var
59 dev_mkdb -f ${ISOROOT}/var/run/dev.db ${ISOROOT}/dev
60 cp /usr/local/bin/mkisofs ${ISOROOT}/usr/local/bin
61 cp /usr/local/man/man8/mkisofs.8.gz ${ISOROOT}/usr/local/man/man8
62 cp /usr/local/bin/cvsup ${ISOROOT}/usr/local/bin
63 cp /usr/local/man/man1/cvsup.1.gz ${ISOROOT}/usr/local/man/man1
66 ( cd ${ISOROOT}; mkisofs -b boot/cdboot -no-emul-boot \
67 -R -J -V DragonFly -o ${ISOFILE} . )
70 if [ -d ${ISOROOT} ]; then chflags -R noschg ${ISOROOT}; fi
71 if [ -d ${ISOROOT} ]; then rm -rf ${ISOROOT}; fi
72 if [ -d ${NRLOBJDIR}/nrelease ]; then rm -rf ${NRLOBJDIR}/nrelease; fi
75 rm -rf ${OBJSYS}/${KERNCONF}
77 .include <bsd.prog.mk>