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