Revamp UPDATING with separate instructions for upgrading from sources
[dragonfly.git] / nrelease / Makefile
CommitLineData
acc392b5 1# $DragonFly: src/nrelease/Makefile,v 1.7 2004/02/11 11:11:24 joerg Exp $
6ca9a59c
MD
2#
3ISODIR ?= /usr/release
4ISOFILE ?= ${ISODIR}/dfly.iso
5ISOROOT = ${ISODIR}/root
6OBJSYS= ${.OBJDIR}/../sys
7KERNCONF ?= GENERIC
8
acc392b5
JS
9WORLD_CCVER ?= ${CCVER}
10KERNEL_CCVER ?= ${CCVER}
11
17d0fefe 12release: check clean buildworld1 buildkernel1 buildiso mkiso
6ca9a59c 13
17d0fefe 14quickrel: check clean buildworld2 buildkernel2 buildiso mkiso
6ca9a59c 15
17d0fefe 16realquickrel: check clean buildiso mkiso
6ca9a59c 17
17d0fefe
MD
18check:
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
6ca9a59c
MD
25
26buildworld1:
acc392b5 27 ( cd ${.CURDIR}/..; make buildworld CCVER=${WORLD_CCVER} )
6ca9a59c
MD
28
29buildworld2:
acc392b5 30 ( cd ${.CURDIR}/..; make -DNOTOOLS -DNOCLEAN buildworld CCVER=${WORLD_CCVER} )
6ca9a59c
MD
31
32buildkernel1:
acc392b5 33 ( cd ${.CURDIR}/..; make buildkernel KERNCONF=${KERNCONF} CCVER=${KERNEL_CCVER} )
6ca9a59c
MD
34
35buildkernel2:
acc392b5 36 ( cd ${.CURDIR}/..; make -DNOCLEAN buildkernel KERNCONF=${KERNCONF} CCVER=${KERNEL_CCVER} )
6ca9a59c
MD
37
38buildiso:
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
1d92043b 48 cp /usr/local/bin/mkisofs ${ISOROOT}/usr/local/bin
6ca9a59c 49 cp /usr/local/man/man8/mkisofs.8.gz ${ISOROOT}/usr/local/man/man8
1d92043b 50 cp /usr/local/bin/cvsup ${ISOROOT}/usr/local/bin
6ca9a59c
MD
51 cp /usr/local/man/man1/cvsup.1.gz ${ISOROOT}/usr/local/man/man1
52
53mkiso:
54 ( cd ${ISOROOT}; mkisofs -b boot/cdboot -no-emul-boot \
382f1ee3 55 -R -J -V DragonFly -o ${ISOFILE} . )
6ca9a59c
MD
56
57clean:
58 if [ -d ${ISOROOT} ]; then chflags -R noschg ${ISOROOT}; fi
59 if [ -d ${ISOROOT} ]; then rm -rf ${ISOROOT}; fi
60
61realclean: clean
3ebedc5e 62 rm -rf ${OBJSYS}/${KERNCONF}
6ca9a59c
MD
63
64.include <bsd.prog.mk>