Makefile revision 1.6
1#	$NetBSD: Makefile,v 1.6 2002/03/11 07:11:38 lukem Exp $
2#
3# instfs.tgz is the filesystem image for disk 2 of the floppy based
4# installation method.
5# It is constructed by tarring up the contents of the miniroot with
6# the exeption of the kernel and boot program.
7#
8
9MINIROOT=	${.CURDIR}/../../miniroot
10
11.include "${.CURDIR}/../../Makefile.inc"
12.include <bsd.own.mk>
13
14MOUNT_POINT?=	/mnt
15# DEV/RDEV file system device, CDEV/RDEV vnconfig device
16VND?=		vnd0
17VND_DEV=	/dev/${VND}a
18VND_RDEV=	/dev/r${VND}a
19VND_CDEV=	/dev/${VND}c
20VND_CRDEV=	/dev/r${VND}c
21INSTFS?=	instfs.tgz
22
23MINIROOTDIR!=	cd ${MINIROOT} && ${PRINTOBJDIR}
24MINIROOT_IMAGE=	${MINIROOTDIR}/miniroot.fs
25
26all: ${INSTFS}
27
28${INSTFS}: ${MINIROOT_IMAGE}
29	vnconfig -v -c ${VND} ${MINIROOT_IMAGE}
30	mount ${VND_DEV} ${MOUNT_POINT}
31	(cd ${MOUNT_POINT}; \
32		tar -z -X ${.CURDIR}/exclude -c -f ${.OBJDIR}/${.TARGET} .)
33	umount ${MOUNT_POINT}
34	vnconfig -u ${VND}
35
36unconfig:
37	-umount -f ${MOUNT_POINT}
38	-vnconfig -u ${VND}
39	-/bin/rm -f ${INSTFS}
40
41clean cleandir distclean:
42	/bin/rm -f *.core ${INSTFS}
43
44.ifndef RELEASEDIR
45release:
46	@echo setenv RELEASEDIR first
47	@false
48.else
49release: ${INSTFS}
50	cp ${INSTFS} $(RELEASEDIR)/installation/bootfs
51.endif	# RELEASEDIR check
52
53.include <bsd.obj.mk>
54.include <bsd.subdir.mk>
55