diff options
Diffstat (limited to 'distrib/macppc/ramdisk/Makefile')
-rw-r--r-- | distrib/macppc/ramdisk/Makefile | 92 |
1 files changed, 40 insertions, 52 deletions
diff --git a/distrib/macppc/ramdisk/Makefile b/distrib/macppc/ramdisk/Makefile index 738c6e1d154..8da4c9302d6 100644 --- a/distrib/macppc/ramdisk/Makefile +++ b/distrib/macppc/ramdisk/Makefile @@ -1,36 +1,17 @@ -# $OpenBSD: Makefile,v 1.40 2019/04/29 15:56:26 deraadt Exp $ - -IMAGE= mr.fs -CRUNCHCONF?= instbin.conf -CRUNCHCONFS?= ${.CURDIR}/../common/crunch.conf -LISTS= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot +# $OpenBSD: Makefile,v 1.41 2019/04/30 17:46:04 deraadt Exp $ +CDROM= cd${OSrev}.iso MTREE= ${UTILS}/mtree.conf -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 - -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else - -# mix config is not needed. -all: bsd.rd cd +LISTS= ${.CURDIR}/list +UTILS= ${.CURDIR}/../../miniroot -bsd.rd: ${IMAGE} bsd - cp bsd bsd.rd - rdsetroot bsd.rd ${IMAGE} +all: ${CDROM} -cd: bsd.rd - -rm -rf ${.OBJDIR}/cd-dir/ - -@mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/macppc/ - cp bsd.rd ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd - strip -R .SUNW_ctf ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd - gzip -9n ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd - mv ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd.gz ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd +${CDROM}: bsd.gz + rm -rf ${.OBJDIR}/cd-dir/ + mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/macppc/ + cp bsd.gz ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd # On HFS, doing the following means COPIES of the files.. therefore # we skip doing so. # ln ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd ${.OBJDIR}/cd-dir/bsd.rd @@ -45,9 +26,25 @@ cd: bsd.rd -P "Copyright (c) `date +%Y` Theo de Raadt, The OpenBSD project" \ -p "Theo de Raadt <deraadt@openbsd.org>" \ -V "OpenBSD/macppc ${OSREV} boot-only CD" \ - -o ${.OBJDIR}/cd${OSrev}.iso ${.OBJDIR}/cd-dir + -o ${CDROM} ${.OBJDIR}/cd-dir + +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 + +bsd.gz: bsd.rd + gzip -9nv < bsd.rd > bsd.gz + +bsd.rd: mr.fs bsd + cp bsd bsd.rd + rdsetroot bsd.rd mr.fs + strip -R .SUNW_ctf bsd.rd + +bsd: + cd ${.CURDIR}/../../../sys/arch/macppc/compile/RAMDISK && \ + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' + cp -p ${.CURDIR}/../../../sys/arch/macppc/compile/RAMDISK/obj/bsd bsd -${IMAGE}: instbin +mr.fs: instbin rm -rf $@.d install -d -o root -g wheel $@.d mtree -def ${MTREE} -p $@.d -u @@ -55,37 +52,28 @@ ${IMAGE}: instbin TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ sh ${UTILS}/runlist.sh ${LISTS} rm $@.d/instbin - makefs ${MAKEFSARGS_RD} $@ $@.d - vnconfig -v mr.fs > vnd - df -i /dev/`cat vnd`a - vnconfig -u `cat vnd` - rm -f vnd - -.endif - -bsd: - cd ${.CURDIR}/../../../sys/arch/macppc/compile/RAMDISK && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' - cp -p ${.CURDIR}/../../../sys/arch/macppc/compile/RAMDISK/obj/bsd bsd + makefs ${MRMAKEFSARGS} $@ $@.d -instbin.mk instbin.cache instbin.c: ${CRUNCHCONF} - crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} +instbin.mk instbin.cache instbin.c: instbin.conf + crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib \ + -c instbin.c -e instbin -m instbin.mk instbin.conf instbin: instbin.mk instbin.cache instbin.c ${MAKE} -f instbin.mk SRCLIBDIR=${.CURDIR}/../../../lib all -${CRUNCHCONF}: ${LISTS} +instbin.conf: ${LISTS} awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ - lib*.a lib*.olist instbin.map *.o *.lo *.c bsd bsd.rd cd${OSrev}.iso - rm -rf cd-dir ${IMAGE}.d - .ifdef RELEASEDIR install: - cp bsd.rd cd${OSrev}.iso ${RELEASEDIR} + cp bsd.rd ${RELEASEDIR}/bsd.rd + chmod a+r ${RELEASEDIR}/bsd.rd + cp ${CDROM} ${RELEASEDIR} .endif +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin.cache \ + lib*.a lib*.olist instbin.map *.o *.lo *.c bsd bsd.rd cd${OSrev}.iso + rm -rf cd-dir mr.fs.d + .include <bsd.obj.mk> -.include <bsd.subdir.mk> |