Introduce /usr/src/nrelease which begins to implement the new 'live CD'
[dragonfly.git] / nrelease / Makefile
CommitLineData
6ca9a59c
MD
1# $DragonFly: src/nrelease/Makefile,v 1.1 2003/12/01 09:59:43 dillon Exp $
2#
3ISODIR ?= /usr/release
4ISOFILE ?= ${ISODIR}/dfly.iso
5ISOROOT = ${ISODIR}/root
6OBJSYS= ${.OBJDIR}/../sys
7KERNCONF ?= GENERIC
8
9.if !exists(/usr/local/bin/mkisofs)
10.error "You need to install the mkisofs port so I can build the ISO"
11.endif
12.if !exists(/usr/local/bin/cvsup)
13.error "You need to install the cvsup port so I can put cvsup in the ISO"
14.endif
15
16release: clean buildworld1 buildkernel1 buildiso mkiso
17
18quickrel: clean buildworld2 buildkernel2 buildiso mkiso
19
20realquickrel: clean buildiso mkiso
21
22buildworld1:
23 ( cd ${.CURDIR}/..; make buildworld )
24
25buildworld2:
26 ( cd ${.CURDIR}/..; make -DNOTOOLS -DNOCLEAN buildworld )
27
28buildkernel1:
29 ( cd ${.CURDIR}/..; make buildkernel KERNCONF=${KERNCONF} )
30
31buildkernel2:
32 ( cd ${.CURDIR}/..; make -DNOCLEAN buildkernel KERNCONF=${KERNCONF} )
33
34buildiso:
35 if [ ! -d ${ISOROOT} ]; then mkdir -p ${ISOROOT}; fi
36 ( cd ${.CURDIR}/..; make DESTDIR=${ISOROOT} installworld )
37 ( cd ${.CURDIR}/../etc; make DESTDIR=${ISOROOT} distribution )
38 cpdup -X cpignore -o ${.CURDIR}/root ${ISOROOT} -vv
39 ( cd ${.CURDIR}/..; make DESTDIR=${ISOROOT} \
40 installkernel KERNCONF=${KERNCONF} )
41 mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.local.dist -p ${ISOROOT}/usr/local/
42 mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.var.dist -p ${ISOROOT}/var
43 dev_mkdb -f ${ISOROOT}/var/run/dev.db ${ISOROOT}/dev
44 cp /usr/local/bin/mkisofs ${ISOROOT}
45 cp /usr/local/man/man8/mkisofs.8.gz ${ISOROOT}/usr/local/man/man8
46 cp /usr/local/bin/cvsup ${ISOROOT}
47 cp /usr/local/man/man1/cvsup.1.gz ${ISOROOT}/usr/local/man/man1
48
49mkiso:
50 ( cd ${ISOROOT}; mkisofs -b boot/cdboot -no-emul-boot \
51 -r -J -V DragonFly -o ${ISOFILE} . )
52
53clean:
54 if [ -d ${ISOROOT} ]; then chflags -R noschg ${ISOROOT}; fi
55 if [ -d ${ISOROOT} ]; then rm -rf ${ISOROOT}; fi
56
57realclean: clean
58 rm -rf ${OBJSYS}/GENERIC
59
60.include <bsd.prog.mk>