Fix a race in the FP copy code. If we setup our temporary FP save area
[dragonfly.git] / nrelease / Makefile
1 # $DragonFly: src/nrelease/Makefile,v 1.8 2004/04/23 02:14:07 dillon Exp $
2 #
3
4 ISODIR ?= /usr/release
5 ISOFILE ?= ${ISODIR}/dfly.iso
6 ISOROOT = ${ISODIR}/root
7 OBJSYS= ${.OBJDIR}/../sys
8 KERNCONF ?= GENERIC
9
10 # note: we use the '${NRLOBJDIR}/nrelease' construct, that is we add
11 # the additional '/nrelease' manually, as a safety measure.
12 #
13 NRLOBJDIR?= /usr/obj
14
15 WORLD_CCVER ?= ${CCVER}
16 KERNEL_CCVER ?= ${CCVER}
17
18 release:        check clean buildworld1 buildkernel1 buildiso mkiso
19
20 quickrel:       check clean buildworld2 buildkernel2 buildiso mkiso
21
22 realquickrel:   check clean buildiso mkiso
23
24 check:
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
31
32 buildworld1:
33         ( cd ${.CURDIR}/..; make buildworld CCVER=${WORLD_CCVER} )
34
35 buildworld2:
36         ( cd ${.CURDIR}/..; make -DNOTOOLS -DNOCLEAN buildworld CCVER=${WORLD_CCVER} )
37
38 buildkernel1:
39         ( cd ${.CURDIR}/..; make buildkernel KERNCONF=${KERNCONF} CCVER=${KERNEL_CCVER} )
40
41 buildkernel2:
42         ( cd ${.CURDIR}/..; make -DNOCLEAN buildkernel KERNCONF=${KERNCONF} CCVER=${KERNEL_CCVER} )
43
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 #
49 buildiso:
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
64
65 mkiso:
66         ( cd ${ISOROOT}; mkisofs -b boot/cdboot -no-emul-boot \
67                 -R -J -V DragonFly -o ${ISOFILE} . )
68
69 clean:
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
73
74 realclean:      clean
75         rm -rf ${OBJSYS}/${KERNCONF}
76
77 .include <bsd.prog.mk>