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