Home | History | Annotate | Line # | Download | only in instfs
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 
      9 TOP=		${.CURDIR}/..
     10 MINIROOT=	${.CURDIR}/../../miniroot
     11 
     12 .include "${TOP}/Makefile.inc"
     13 .include <bsd.own.mk>
     14 
     15 MOUNT_POINT?=	/mnt
     16 # DEV/RDEV file system device, CDEV/RDEV vnconfig device
     17 VND?=		vnd0
     18 VND_DEV=	/dev/${VND}a
     19 VND_RDEV=	/dev/r${VND}a
     20 VND_CDEV=	/dev/${VND}c
     21 VND_CRDEV=	/dev/r${VND}c
     22 INSTFS?=	instfs.tgz
     23 
     24 MINIROOTDIR!=	cd ${MINIROOT} && ${PRINTOBJDIR}
     25 MINIROOT_IMAGE=	${MINIROOTDIR}/miniroot.fs
     26 
     27 all: ${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 
     37 unconfig:
     38 	-umount -f ${MOUNT_POINT}
     39 	-vnconfig -u ${VND}
     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 ${INSTFS} $(RELEASEDIR)/installation/bootfs
     52 .endif	# RELEASEDIR check
     53 
     54 .include <bsd.obj.mk>
     55 .include <bsd.subdir.mk>
     56