Home | History | Annotate | Line # | Download | only in instfs
Makefile revision 1.2
      1  1.2  mrg #	$NetBSD: Makefile,v 1.2 2001/08/23 16:59:33 mrg Exp $
      2  1.1  mrg #
      3  1.1  mrg # instfs.tgz is the filesystem image for disk 2 of the floppy based
      4  1.1  mrg # installation method.
      5  1.1  mrg # It is constructed by tarring up the contents of the miniroot with
      6  1.1  mrg # the exeption of the kernel and boot program.
      7  1.1  mrg #
      8  1.1  mrg 
      9  1.1  mrg TOP=		${.CURDIR}/..
     10  1.1  mrg MINIROOT=	${.CURDIR}/../xminiroot
     11  1.1  mrg 
     12  1.1  mrg .include "${TOP}/Makefile.inc"
     13  1.1  mrg 
     14  1.1  mrg MOUNT_POINT?=	/mnt
     15  1.1  mrg # DEV/RDEV file system device, CDEV/RDEV vnconfig device
     16  1.1  mrg VND?=		vnd0
     17  1.1  mrg VND_DEV=	/dev/${VND}a
     18  1.1  mrg VND_RDEV=	/dev/r${VND}a
     19  1.1  mrg VND_CDEV=	/dev/${VND}c
     20  1.1  mrg VND_CRDEV=	/dev/r${VND}c
     21  1.1  mrg INSTFS?=	instfs.tgz
     22  1.1  mrg 
     23  1.2  mrg MINIROOT_DIR!=cd ${MINIROOT}; \
     24  1.2  mrg 		printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | \
     25  1.1  mrg 		${MAKE} -s -f-
     26  1.2  mrg MINIROOT_IMAGE=	${MINIROOT_DIR}/miniroot.fs
     27  1.2  mrg MINIROOT_KERNEL=${MINIROOT_DIR}/netbsd.INSTALL
     28  1.1  mrg 
     29  1.1  mrg all: ${INSTFS}
     30  1.1  mrg 
     31  1.1  mrg ${INSTFS}: ${MINIROOT_IMAGE}
     32  1.1  mrg 	vnconfig -v -c ${VND_CDEV} ${MINIROOT_IMAGE}
     33  1.1  mrg 	mount ${VND_DEV} ${MOUNT_POINT}
     34  1.1  mrg 	(cd ${MOUNT_POINT}; \
     35  1.1  mrg 		tar -z -X ${.CURDIR}/exclude -c -f ${.OBJDIR}/${.TARGET} .)
     36  1.1  mrg 	umount ${MOUNT_POINT}
     37  1.1  mrg 	vnconfig -u ${VND_CDEV}
     38  1.1  mrg 
     39  1.1  mrg unconfig:
     40  1.1  mrg 	-umount -f ${MOUNT_POINT}
     41  1.1  mrg 	-vnconfig -u ${VND_DEV}
     42  1.1  mrg 	-/bin/rm -f ${INSTFS}
     43  1.1  mrg 
     44  1.1  mrg clean cleandir distclean:
     45  1.1  mrg 	/bin/rm -f *.core ${INSTFS}
     46  1.1  mrg 
     47  1.1  mrg .ifndef RELEASEDIR
     48  1.1  mrg release:
     49  1.1  mrg 	@echo setenv RELEASEDIR first
     50  1.1  mrg 	@false
     51  1.1  mrg .else
     52  1.1  mrg release: ${INSTFS}
     53  1.1  mrg 	cp ${INSTFS} $(RELEASEDIR)/installation/misc
     54  1.2  mrg 	gzip -9 -c ${MINIROOT_KERNEL} > $(RELEASEDIR)/binary/kernel/netbsd.INSTALL.gz
     55  1.1  mrg .endif	# RELEASEDIR check
     56  1.1  mrg 
     57  1.1  mrg .include <bsd.obj.mk>
     58  1.1  mrg .include <bsd.subdir.mk>
     59