summaryrefslogtreecommitdiff
path: root/distrib/amd64/ramdisk_cd
diff options
context:
space:
mode:
authorMartin Natano <natano@cvs.openbsd.org>2016-10-19 17:45:39 +0000
committerMartin Natano <natano@cvs.openbsd.org>2016-10-19 17:45:39 +0000
commit9a23494aa0d3aabacfd327dd2ccd3f4e5a015c96 (patch)
tree6495c9f4cc68b5b066e9b52ea27a12e1217d8967 /distrib/amd64/ramdisk_cd
parent405accb4ad566cf0e3a90c0fe7d92f16d3c516e4 (diff)
Inline IMAGE, CBIN, CRUNCHCONF and XNAME.
ok deraadt
Diffstat (limited to 'distrib/amd64/ramdisk_cd')
-rw-r--r--distrib/amd64/ramdisk_cd/Makefile3
-rw-r--r--distrib/amd64/ramdisk_cd/Makefile.inc42
2 files changed, 20 insertions, 25 deletions
diff --git a/distrib/amd64/ramdisk_cd/Makefile b/distrib/amd64/ramdisk_cd/Makefile
index 9848bb3a11a..2cf81edf8dc 100644
--- a/distrib/amd64/ramdisk_cd/Makefile
+++ b/distrib/amd64/ramdisk_cd/Makefile
@@ -1,10 +1,9 @@
-# $OpenBSD: Makefile,v 1.9 2016/10/19 16:49:58 deraadt Exp $
+# $OpenBSD: Makefile,v 1.10 2016/10/19 17:45:38 natano Exp $
.PATH: ${.CURDIR}/../ramdisk
RAMDISK=RAMDISK_CD
FLOPPYSIZE=7936
FLOPPYTYPE=mini34
-XNAME=miniroot
LBA=1
TEMPLATE=${.CURDIR}/template
diff --git a/distrib/amd64/ramdisk_cd/Makefile.inc b/distrib/amd64/ramdisk_cd/Makefile.inc
index f4900f8cca3..ab8dfb3221e 100644
--- a/distrib/amd64/ramdisk_cd/Makefile.inc
+++ b/distrib/amd64/ramdisk_cd/Makefile.inc
@@ -1,19 +1,15 @@
-# $OpenBSD: Makefile.inc,v 1.1 2016/10/19 16:49:58 deraadt Exp $
+# $OpenBSD: Makefile.inc,v 1.2 2016/10/19 17:45:38 natano Exp $
TOP= ${.CURDIR}/..
.include "${TOP}/Makefile.inc"
-IMAGE= mr.fs
-CBIN?= instbin
-CRUNCHCONF?= ${CBIN}.conf
LISTS?= ${.CURDIR}/../common/list
UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
-XNAME?= floppy
-FS?= ${XNAME}${REV}.fs
+FS?= miniroot${REV}.fs
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
@@ -72,9 +68,9 @@ bsd.gz: bsd.rd
strip -R .comment bsd.strip
gzip -c9n bsd.strip > bsd.gz
-bsd.rd: ${IMAGE} bsd rdsetroot
+bsd.rd: mr.fs bsd rdsetroot
cp bsd bsd.rd
- ${.OBJDIR}/rdsetroot bsd.rd ${IMAGE}
+ ${.OBJDIR}/rdsetroot bsd.rd mr.fs
bsd:
@@ -82,9 +78,9 @@ bsd:
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Os ${MAKE}'
cp -p ${.CURDIR}/../../../sys/arch/amd64/compile/${RAMDISK}/obj/bsd bsd
-${IMAGE}: ${CBIN} rd_setup do_files rd_teardown
+mr.fs: instbin rd_setup do_files rd_teardown
-rd_setup: ${CBIN}
+rd_setup: instbin
dd if=/dev/zero of=${REALIMAGE} bs=512 count=${NBLKS}
vnconfig -v -c ${VND} ${REALIMAGE}
disklabel -w ${VND} ${DISKTYPE}
@@ -96,7 +92,7 @@ rd_teardown:
@df -i ${MOUNT_POINT}
-umount ${MOUNT_POINT}
-vnconfig -u ${VND}
- cp ${REALIMAGE} ${IMAGE}
+ cp ${REALIMAGE} mr.fs
rm ${REALIMAGE}
rdsetroot: ${TOP}/../common/elfrdsetroot.c
@@ -108,7 +104,7 @@ unconfig:
-umount -f ${MOUNT_POINT}
-vnconfig -u ${VND}
-.PRECIOUS: ${IMAGE}
+.PRECIOUS: mr.fs
.ifdef RELEASEDIR
install:
@@ -120,29 +116,29 @@ install:
.endif
.endif # RELEASEDIR
-${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
+instbin.mk instbin.cache instbin.c: instbin.conf
crunchgen -E -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib \
- -c ${CBIN}.c -e ${CBIN} -m ${CBIN}.mk ${CRUNCHCONF}
+ -c instbin.c -e instbin -m instbin.mk instbin.conf
-${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
- ${MAKE} -f ${CBIN}.mk SRCLIBDIR=${.CURDIR}/../../../lib all
- strip -R .comment ${CBIN}
+instbin: instbin.mk instbin.cache instbin.c
+ ${MAKE} -f instbin.mk SRCLIBDIR=${.CURDIR}/../../../lib all
+ strip -R .comment instbin
-${CRUNCHCONF}: ${LISTS}
- awk -f ${UTILS}/makeconf.awk CBIN=${CBIN} ${LISTS} > ${CRUNCHCONF}
+instbin.conf: ${LISTS}
+ awk -f ${UTILS}/makeconf.awk CBIN=instbin ${LISTS} > instbin.conf
do_files:
mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
REV=${REV} TARGDIR=${MOUNT_POINT} UTILS=${UTILS} \
RELEASEDIR=${RELEASEDIR} sh ${UTILS}/runlist.sh ${LISTS}
- rm ${MOUNT_POINT}/${CBIN}
+ rm ${MOUNT_POINT}/instbin
clean cleandir:
- /bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}*.cache \
+ /bin/rm -f *.core mr.fs instbin instbin.mk instbin*.cache \
*.o *.lo *.c bsd bsd.rd bsd.gz bsd.strip floppy*.fs \
- lib*.a lib*.olist ${CBIN}.map \
- rdsetroot boot ${CRUNCHCONF} ${FS}
+ lib*.a lib*.olist instbin.map \
+ rdsetroot boot instbin.conf ${FS}
.include <bsd.obj.mk>
.include <bsd.subdir.mk>