diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-04-30 17:46:07 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-04-30 17:46:07 +0000 |
commit | d3aa0d760e1ed38557b0c9da42407fc9ad97d828 (patch) | |
tree | 2dec49beadb3ffe5f5334cd98424fbbab5ba000e /distrib/macppc/ramdisk | |
parent | 7f1a8bec460a41a172fb21ffab33697ce8395c12 (diff) |
Every Makefile on every architecture had deviated in unique ways.
Eliminate many more differences. When it makes sense, build bsd.rd
and miniroot/ramdisk.fs and cd.iso in the same directory. More steps
coming after this..
Diffstat (limited to 'distrib/macppc/ramdisk')
-rw-r--r-- | distrib/macppc/ramdisk/Makefile | 92 | ||||
-rw-r--r-- | distrib/macppc/ramdisk/Makefile.inc | 3 |
2 files changed, 40 insertions, 55 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> diff --git a/distrib/macppc/ramdisk/Makefile.inc b/distrib/macppc/ramdisk/Makefile.inc deleted file mode 100644 index 55385fb2dc2..00000000000 --- a/distrib/macppc/ramdisk/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.2 2014/07/16 19:59:30 okan Exp $ - -CRUNCHGENOPTS= -E |