Sync usage with man page.
[netbsd-mini2440.git] / distrib / vax / inst-common / Makefile.inc
blob2abd0ac3e9dcdaa5e35a4c5735a343d3dacd6b98
1 #       $NetBSD: Makefile.inc,v 1.15 2003/10/26 07:25:34 lukem Exp $
3 # TOP is assumed to be defined by Makefile including this one.
5 CBIN=           instbin
6 COMMONDIR=      ${TOP}/inst-common
8 MOUNT_POINT?=   /mnt
9 VND?=           vnd0
10 VND_DEV=        /dev/${VND}c
11 VND_RDEV=       /dev/r${VND}c
12 IMAGE?=         miniroot-${DISTRIBREV}.fs
13 BOOTSYS=        bootroot-${DISTRIBREV}.fs
14 MDEC=           ${DESTDIR}/usr/mdec
16 LISTS=          ${COMMONDIR}/list ${.CURDIR}/list
17 CRUNCHCONF=     ${COMMONDIR}/${CBIN}.conf
18 MTREECONF=      ${COMMONDIR}/mtree.conf
20 DISKTYPE=       miniroot
21 BOOTDISKTYPE=   bootroot
23 all: ${CBIN} bootroot
24         dd if=/dev/zero of=${IMAGE} bs=64k count=32
25         vnconfig -t ${DISKTYPE} -v -c ${VND_DEV} ${IMAGE}
26         newfs -B le -O -m 0 -o space -i 8192 ${VND_RDEV} ${DISKTYPE}
27         mount ${VND_DEV} ${MOUNT_POINT}
28         ${TOOL_MTREE} -def ${MTREECONF} -p ${MOUNT_POINT}/ -u
29         TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
30             KERNOBJDIR=${KERNOBJDIR} TARGDIR=${MOUNT_POINT} ${HOST_SH} \
31             ${NETBSDSRCDIR}/distrib/common/runlist.sh ${LISTS}
32         @echo ""
33         @df -i ${MOUNT_POINT}
34         @echo ""
35         umount -f ${MOUNT_POINT}
36         vnconfig -u ${VND_DEV}
38 bootroot: edlabel copy xxboot boot
39         dd if=/dev/zero of=${BOOTSYS} bs=64k count=4
40         vnconfig -t ${BOOTDISKTYPE} -v -c ${VND_DEV} ${BOOTSYS}
41         newfs -B le -O -m 0 -o space -i 8192 ${VND_RDEV} ${BOOTDISKTYPE}
42         dd if=xxboot of=/dev/rvnd0a count=16
43         mount ${VND_DEV} ${MOUNT_POINT}
44         cp edlabel copy boot ${MOUNT_POINT}
45         umount -f ${MOUNT_POINT}
46         vnconfig -u ${VND_DEV}
48 edlabel copy xxboot boot:
49         (cd /sys/arch/vax/boot; ${MAKE})
50         cp /sys/arch/vax/boot/edlabel .
51         cp /sys/arch/vax/boot/copy .
52         cp /sys/arch/vax/boot/xxboot .
53         cp /sys/arch/vax/boot/boot .
55 unconfig:
56         -umount -f ${MOUNT_POINT}
57         -vnconfig -u ${VND_DEV} ${IMAGE}
58         -/bin/rm -f ${IMAGE}
60 ${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
61         ${TOOL_CRUNCHGEN} ${CRUNCHCONF}
63 ${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
64         ${MAKE} -f ${CBIN}.mk
66 clean cleandir distclean:
67         /bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.cro *.c
69 .include <bsd.obj.mk>
70 .include <bsd.subdir.mk>