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/hppa | |
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/hppa')
-rw-r--r-- | distrib/hppa/iso/Makefile | 5 | ||||
-rw-r--r-- | distrib/hppa/ramdisk/Makefile | 103 | ||||
-rw-r--r-- | distrib/hppa/ramdisk/list.local | 4 |
3 files changed, 45 insertions, 67 deletions
diff --git a/distrib/hppa/iso/Makefile b/distrib/hppa/iso/Makefile index ab79cdf4f68..ca259892f34 100644 --- a/distrib/hppa/iso/Makefile +++ b/distrib/hppa/iso/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.17 2019/04/29 15:56:25 deraadt Exp $ +# $OpenBSD: Makefile,v 1.18 2019/04/30 17:46:03 deraadt Exp $ CDROM= install${OSrev}.iso RELXDIR?= /home/relx-${MACHINE} @@ -14,7 +14,7 @@ XBASE= ${RELXDIR}/xbase${OSrev}.tgz ${RELXDIR}/xfont${OSrev}.tgz \ all: ${CDROM} ${CDROM}: ${BASE} ${XBASE} - -rm -rf ${.OBJDIR}/cd-dir + rm -rf ${.OBJDIR}/cd-dir mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} cp -p ${BASE} ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} @@ -44,4 +44,3 @@ clean cleandir: /bin/rm -rf cd-dir ${CDROM} .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/hppa/ramdisk/Makefile b/distrib/hppa/ramdisk/Makefile index 8b70ac71c78..91b62add9ef 100644 --- a/distrib/hppa/ramdisk/Makefile +++ b/distrib/hppa/ramdisk/Makefile @@ -1,98 +1,77 @@ -# $OpenBSD: Makefile,v 1.40 2019/04/29 01:48:40 deraadt Exp $ +# $OpenBSD: Makefile,v 1.41 2019/04/30 17:46:03 deraadt Exp $ -ARCHDIR= ${.CURDIR}/.. -SRCDIR= ${.CURDIR}/../../.. - -.include <bsd.own.mk> - -.if exists(${ARCHDIR}/Makefile.inc) -.include "${ARCHDIR}/Makefile.inc" -.endif - -IMAGE?= ramdisk${OSrev}.fs -CRUNCHGENOPTS?=-E -RAMDISK?= RAMDISK -UTILS?= ${.CURDIR}/../../miniroot - -LISTS= ${ARCHDIR}/list ${.CURDIR}/list.local +CDROM= cd${OSrev}.iso +LIF= lif${OSrev}.fs MTREE= ${UTILS}/mtree.conf -LIF?= lif${OSrev}.fs -CDROM?= cd${OSrev}.iso -MKBOOT?= /usr/mdec/mkboot -BOOT?= ${DESTDIR}/usr/mdec/boot -CDBOOT?= ${DESTDIR}/usr/mdec/cdboot +LISTS= ${.CURDIR}/../list ${.CURDIR}/list.local +UTILS= ${.CURDIR}/../../miniroot -STRIPOPTS?= -R .SUNW_ctf +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 +all: ${LIF} ${CDROM} -all: bsd.rd ${LIF} ${CDROM} +${LIF}: bsd.lif + /usr/mdec/mkboot -v ${DESTDIR}/usr/mdec/boot bsd.lif ${LIF} -${LIF}: bsd ${BOOT} - ${MKBOOT} -v ${BOOT} bsd ${LIF} - -${CDROM}: bsd ${CDBOOT} - -rm -rf ${.OBJDIR}/cd-dir - mkdir ${.OBJDIR}/cd-dir +${CDROM}: bsd.rd + rm -rf ${.OBJDIR}/cd-dir/ + mkdir -p ${.OBJDIR}/cd-dir/ cp bsd.rd ${.OBJDIR}/cd-dir/bsd.rd mkhybrid -A "OpenBSD ${OSREV} hppa bootonly CD" \ -P "Copyright (c) `date +%Y` Theo de Raadt, The OpenBSD project" \ -p "Theo de Raadt <deraadt@openbsd.org>" \ -V "OpenBSD/hppa ${OSREV} boot-only CD" \ -o ${.OBJDIR}/${CDROM} ${.OBJDIR}/cd-dir - dd if=${CDBOOT} of=${.OBJDIR}/${CDROM} bs=32k count=1 conv=notrunc + dd if=${DESTDIR}/usr/mdec/cdboot of=${.OBJDIR}/${CDROM} \ + bs=32k count=1 conv=notrunc dd if=/dev/zero bs=64k count=1 >> ${.OBJDIR}/${CDROM} -obsd: - cd ${SRCDIR}/sys/arch/${MACHINE}/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' - cp -p ${SRCDIR}/sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd obsd +bsd.rd: mr.fs bsd + cp bsd bsd.rd + rdsetroot bsd.rd mr.fs + strip -R .SUNW_ctf bsd.rd -bsd.rd: obsd ${IMAGE} - cp obsd bsd.rd - rdsetroot bsd.rd ${IMAGE} - strip ${STRIPOPTS} bsd.rd +bsd.lif: bsd.rd + (cat bsd.rd ; dd if=/dev/zero count=1) | gzip -9nv > bsd.lif -bsd: bsd.rd - (cat bsd.rd ; dd if=/dev/zero count=1) | gzip -9nv > bsd +bsd: + cd ${.CURDIR}/../../../sys/arch/hppa/compile/RAMDISK && \ + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' + cp -p ${.CURDIR}/../../../sys/arch/hppa/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 - CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} OSrev=${OSrev} ARCHDIR=${ARCHDIR} \ + CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} OSrev=${OSrev} \ TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ sh ${UTILS}/runlist.sh ${LISTS} rm $@.d/instbin - makefs ${MAKEFSARGS_RD} $@ $@.d - vnconfig -v ${IMAGE} > vnd - df -i /dev/`cat vnd`a - vnconfig -u `cat vnd` - rm -f vnd - -instbin.conf: ${LISTS} - awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf + makefs ${MRMAKEFSARGS} $@ $@.d instbin.mk instbin.cache instbin.c: instbin.conf - crunchgen ${CRUNCHGENOPTS} -D ${SRCDIR} -L ${DESTDIR}/usr/lib \ - 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 -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ - lib*.a lib*.olist instbin.map \ - instbin.conf *.o *.lo *.c obsd bsd bsd.* ${LIF} ${CDROM} - /bin/rm -rf ${IMAGE}.d +instbin.conf: ${LISTS} + awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf .ifdef RELEASEDIR -beforeinstall: - cp bsd.rd ${LIF} ${CDROM} ${RELEASEDIR} +install: + cp bsd.rd ${RELEASEDIR}/bsd.rd chmod a+r ${RELEASEDIR}/bsd.rd + cp ${LIF} ${CDROM} ${RELEASEDIR} .endif +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin.cache \ + lib*.a lib*.olist instbin.map \ + instbin.conf *.o *.lo *.c bsd bsd.* ${LIF} ${CDROM} + /bin/rm -rf mr.fs.d + .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/hppa/ramdisk/list.local b/distrib/hppa/ramdisk/list.local index 2d76427beb8..7c4f54bce6b 100644 --- a/distrib/hppa/ramdisk/list.local +++ b/distrib/hppa/ramdisk/list.local @@ -1,4 +1,4 @@ -# $OpenBSD: list.local,v 1.6 2017/11/19 12:11:53 job Exp $ +# $OpenBSD: list.local,v 1.7 2019/04/30 17:46:03 deraadt Exp $ # hppa extra's LINK instbin sbin/disklabel @@ -19,5 +19,5 @@ SYMLINK /tmp/i/hosts etc/hosts TERMCAP vt100,vt220,dumb,hp2392,hpansi,hpsub,hpex,hp700-wy,hp70092 usr/share/misc/termcap # and the installation tools (no upgrade from to 3.3) -SCRIPT ${ARCHDIR}/install.md install.md +SCRIPT ${CURDIR}/../install.md install.md TZ |