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