(installer support). We are going to have a special 'installer' login
[dragonfly.git] / nrelease / Makefile
CommitLineData
5b22b655 1# $DragonFly: src/nrelease/Makefile,v 1.8 2004/04/23 02:14:07 dillon Exp $
6ca9a59c 2#
5b22b655 3
6ca9a59c
MD
4ISODIR ?= /usr/release
5ISOFILE ?= ${ISODIR}/dfly.iso
6ISOROOT = ${ISODIR}/root
7OBJSYS= ${.OBJDIR}/../sys
8KERNCONF ?= GENERIC
9
5b22b655
MD
10# note: we use the '${NRLOBJDIR}/nrelease' construct, that is we add
11# the additional '/nrelease' manually, as a safety measure.
12#
13NRLOBJDIR?= /usr/obj
14
acc392b5
JS
15WORLD_CCVER ?= ${CCVER}
16KERNEL_CCVER ?= ${CCVER}
17
17d0fefe 18release: check clean buildworld1 buildkernel1 buildiso mkiso
6ca9a59c 19
17d0fefe 20quickrel: check clean buildworld2 buildkernel2 buildiso mkiso
6ca9a59c 21
17d0fefe 22realquickrel: check clean buildiso mkiso
6ca9a59c 23
17d0fefe
MD
24check:
25 if [ ! -f /usr/local/bin/mkisofs ]; then \
26 echo "You need to install the mkisofs port for this target"; \
27 exit 1; fi
28 if [ ! -f /usr/local/bin/cvsup ]; then \
29 echo "You need to install the cvsup port for this target"; \
30 exit 1; fi
6ca9a59c
MD
31
32buildworld1:
acc392b5 33 ( cd ${.CURDIR}/..; make buildworld CCVER=${WORLD_CCVER} )
6ca9a59c
MD
34
35buildworld2:
acc392b5 36 ( cd ${.CURDIR}/..; make -DNOTOOLS -DNOCLEAN buildworld CCVER=${WORLD_CCVER} )
6ca9a59c
MD
37
38buildkernel1:
acc392b5 39 ( cd ${.CURDIR}/..; make buildkernel KERNCONF=${KERNCONF} CCVER=${KERNEL_CCVER} )
6ca9a59c
MD
40
41buildkernel2:
acc392b5 42 ( cd ${.CURDIR}/..; make -DNOCLEAN buildkernel KERNCONF=${KERNCONF} CCVER=${KERNEL_CCVER} )
6ca9a59c 43
5b22b655
MD
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.
48#
6ca9a59c
MD
49buildiso:
50 if [ ! -d ${ISOROOT} ]; then mkdir -p ${ISOROOT}; fi
5b22b655 51 if [ ! -d ${NRLOBJDIR}/nrelease ]; then mkdir -p ${NRLOBJDIR}/nrelease; fi
6ca9a59c 52 ( cd ${.CURDIR}/..; make DESTDIR=${ISOROOT} installworld )
5b22b655 53 ( cd ${.CURDIR}/../etc; MAKEOBJDIRPREFIX=${NRLOBJDIR}/nrelease make DESTDIR=${ISOROOT} distribution )
6ca9a59c
MD
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
1d92043b 60 cp /usr/local/bin/mkisofs ${ISOROOT}/usr/local/bin
6ca9a59c 61 cp /usr/local/man/man8/mkisofs.8.gz ${ISOROOT}/usr/local/man/man8
1d92043b 62 cp /usr/local/bin/cvsup ${ISOROOT}/usr/local/bin
6ca9a59c
MD
63 cp /usr/local/man/man1/cvsup.1.gz ${ISOROOT}/usr/local/man/man1
64
65mkiso:
66 ( cd ${ISOROOT}; mkisofs -b boot/cdboot -no-emul-boot \
382f1ee3 67 -R -J -V DragonFly -o ${ISOFILE} . )
6ca9a59c
MD
68
69clean:
70 if [ -d ${ISOROOT} ]; then chflags -R noschg ${ISOROOT}; fi
71 if [ -d ${ISOROOT} ]; then rm -rf ${ISOROOT}; fi
5b22b655 72 if [ -d ${NRLOBJDIR}/nrelease ]; then rm -rf ${NRLOBJDIR}/nrelease; fi
6ca9a59c
MD
73
74realclean: clean
3ebedc5e 75 rm -rf ${OBJSYS}/${KERNCONF}
6ca9a59c
MD
76
77.include <bsd.prog.mk>