1 # $NetBSD: Makefile,v 1.2 2001/08/23 16:59:33 mrg 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}/../xminiroot 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_DIR!=cd ${MINIROOT}; \ 24 printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | \ 25 ${MAKE} -s -f- 26 MINIROOT_IMAGE= ${MINIROOT_DIR}/miniroot.fs 27 MINIROOT_KERNEL=${MINIROOT_DIR}/netbsd.INSTALL 28 29 all: ${INSTFS} 30 31 ${INSTFS}: ${MINIROOT_IMAGE} 32 vnconfig -v -c ${VND_CDEV} ${MINIROOT_IMAGE} 33 mount ${VND_DEV} ${MOUNT_POINT} 34 (cd ${MOUNT_POINT}; \ 35 tar -z -X ${.CURDIR}/exclude -c -f ${.OBJDIR}/${.TARGET} .) 36 umount ${MOUNT_POINT} 37 vnconfig -u ${VND_CDEV} 38 39 unconfig: 40 -umount -f ${MOUNT_POINT} 41 -vnconfig -u ${VND_DEV} 42 -/bin/rm -f ${INSTFS} 43 44 clean cleandir distclean: 45 /bin/rm -f *.core ${INSTFS} 46 47 .ifndef RELEASEDIR 48 release: 49 @echo setenv RELEASEDIR first 50 @false 51 .else 52 release: ${INSTFS} 53 cp ${INSTFS} $(RELEASEDIR)/installation/misc 54 gzip -9 -c ${MINIROOT_KERNEL} > $(RELEASEDIR)/binary/kernel/netbsd.INSTALL.gz 55 .endif # RELEASEDIR check 56 57 .include <bsd.obj.mk> 58 .include <bsd.subdir.mk> 59