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/sgi/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/sgi/ramdisk')
-rw-r--r-- | distrib/sgi/ramdisk/Makefile | 56 | ||||
-rw-r--r-- | distrib/sgi/ramdisk/Makefile.inc | 3 |
2 files changed, 21 insertions, 38 deletions
diff --git a/distrib/sgi/ramdisk/Makefile b/distrib/sgi/ramdisk/Makefile index b66ea66882e..a08a863a8a1 100644 --- a/distrib/sgi/ramdisk/Makefile +++ b/distrib/sgi/ramdisk/Makefile @@ -1,45 +1,32 @@ -# $OpenBSD: Makefile,v 1.28 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.29 2019/04/30 17:46:05 deraadt Exp $ MTREE= ${UTILS}/mtree.conf -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 +LISTS= ${.CURDIR}/list +UTILS= ${.CURDIR}/../../miniroot -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before makeing a ramdisk! - @false -.else +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 ALLIP= 22 26 27 28 30 32 -ALLBSD= ALLBSDRD= .for IP in ${ALLIP} -ALLBSD+= bsd.IP${IP} ALLBSDRD+= bsd.rd.IP${IP} all: ${ALLBSDRD} .endfor .for IP in ${ALLIP} +bsd.rd.IP${IP}: mr.fs bsd.IP${IP} + cp bsd.IP${IP} bsd.rd.IP${IP} + rdsetroot bsd.rd.IP${IP} mr.fs + bsd.IP${IP}: -.ifndef NOBUILD cd ${.CURDIR}/../../../sys/arch/sgi/compile/RAMDISK-IP${IP} && \ su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' -.endif cp -p ${.CURDIR}/../../../sys/arch/sgi/compile/RAMDISK-IP${IP}/obj/bsd bsd.IP${IP} - -bsd.rd.IP${IP}: ${IMAGE} bsd.IP${IP} - cp bsd.IP${IP} bsd.rd.IP${IP} - rdsetroot bsd.rd.IP${IP} ${IMAGE} .endfor -${IMAGE}: instbin +mr.fs: instbin rm -rf $@.d install -d -o root -g wheel $@.d mtree -def ${MTREE} -p $@.d -u @@ -47,28 +34,27 @@ ${IMAGE}: instbin TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ sh ${UTILS}/runlist.sh ${LISTS} rm $@.d/instbin - makefs ${MAKEFSARGS_RD} $@ $@.d + makefs ${MRMAKEFSARGS} $@ $@.d -.endif - -instbin.mk instbin.cache instbin.c: ${CRUNCHCONF} - crunchgen -M -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} +instbin.mk instbin.cache instbin.c: instbin.conf + crunchgen -M -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 ${ALLBSD} ${ALLBSDRD} *.o *.lo *.c - /bin/rm -rf ${IMAGE}.d - .ifdef RELEASEDIR install: cp ${ALLBSDRD} ${RELEASEDIR} .endif + +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin.cache \ + lib*.a lib*.olist instbin.map ${ALLBSD} ${ALLBSDRD} *.o *.lo *.c + /bin/rm -rf mr.fs.d + .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/sgi/ramdisk/Makefile.inc b/distrib/sgi/ramdisk/Makefile.inc deleted file mode 100644 index 55385fb2dc2..00000000000 --- a/distrib/sgi/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 |