Makefile revision 1.5
1#	$NetBSD: Makefile,v 1.5 2002/03/05 21:16:52 thorpej 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
9TOP=		${.CURDIR}/..
10MINIROOT=	${.CURDIR}/../../miniroot
11
12.include "${TOP}/Makefile.inc"
13.include <bsd.own.mk>
14
15MOUNT_POINT?=	/mnt
16# DEV/RDEV file system device, CDEV/RDEV vnconfig device
17VND?=		vnd0
18VND_DEV=	/dev/${VND}a
19VND_RDEV=	/dev/r${VND}a
20VND_CDEV=	/dev/${VND}c
21VND_CRDEV=	/dev/r${VND}c
22INSTFS?=	instfs.tgz
23
24MINIROOTDIR!=	cd ${MINIROOT} && ${PRINTOBJDIR}
25MINIROOT_IMAGE=	${MINIROOTDIR}/miniroot.fs
26
27all: ${INSTFS}
28
29${INSTFS}: ${MINIROOT_IMAGE}
30	vnconfig -v -c ${VND} ${MINIROOT_IMAGE}
31	mount ${VND_DEV} ${MOUNT_POINT}
32	(cd ${MOUNT_POINT}; \
33		tar -z -X ${.CURDIR}/exclude -c -f ${.OBJDIR}/${.TARGET} .)
34	umount ${MOUNT_POINT}
35	vnconfig -u ${VND}
36
37unconfig:
38	-umount -f ${MOUNT_POINT}
39	-vnconfig -u ${VND}
40	-/bin/rm -f ${INSTFS}
41
42clean cleandir distclean:
43	/bin/rm -f *.core ${INSTFS}
44
45.ifndef RELEASEDIR
46release:
47	@echo setenv RELEASEDIR first
48	@false
49.else
50release: ${INSTFS}
51	cp ${INSTFS} $(RELEASEDIR)/installation/bootfs
52.endif	# RELEASEDIR check
53
54.include <bsd.obj.mk>
55.include <bsd.subdir.mk>
56