summaryrefslogtreecommitdiff
path: root/distrib/amd64/ramdisk_cd
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2021-07-26 12:47:48 +0000
committerkn <kn@cvs.openbsd.org>2021-07-26 12:47:48 +0000
commit6cc79f68089a7db02ffed215bdd098edc274fec5 (patch)
tree6b5c9e83a04364707001724b2c04cc11c7f8e3bf /distrib/amd64/ramdisk_cd
parentfbeb36730108f715d613dba2aec63f9310695251 (diff)
Pass make flags to kernel and lib builds
Running `make -j4' in /usr/src/distrib/amd64/ramdisk_cd/ et al. executes make(1) to both build the RAMDISK kernel and build libraries. Doing so does not propagate the flags specified to the ramdisk_cd invocation, which in turn means `-j4' for example is ignored and both kernel and libraries will not be built in parallel. Pass make(1)'s MFLAGS along to retain relevant flags; make is clever enough to separate flags, variable assignments and targets from each other and only pass along things to `MFLAGS' that'd make sense, i.e. `make -C. -j4 foo=bar' does *not* pass `-C.' to change directories. (can be easily tested with `make -p ... | grep MFLAGS'.) This makes hacking on ramdisks/the installer much faster, espescially since the `bsd' target does `make clean' and therefore builds a new kernel every time. OK deraadt
Diffstat (limited to 'distrib/amd64/ramdisk_cd')
-rw-r--r--distrib/amd64/ramdisk_cd/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/distrib/amd64/ramdisk_cd/Makefile b/distrib/amd64/ramdisk_cd/Makefile
index 70ae847b3e6..a21973f3a0f 100644
--- a/distrib/amd64/ramdisk_cd/Makefile
+++ b/distrib/amd64/ramdisk_cd/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.30 2021/02/14 17:14:42 semarie Exp $
+# $OpenBSD: Makefile,v 1.31 2021/07/26 12:47:45 kn Exp $
FS= miniroot${OSrev}.img
FSSIZE= 9920
@@ -67,7 +67,7 @@ bsd.rd: mr.fs bsd
bsd:
cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
- su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
+ su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE} ${MFLAGS}'
cp -p ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd bsd
mr.fs: instbin
@@ -85,7 +85,7 @@ instbin.mk instbin.cache instbin.c: instbin.conf
-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
+ ${MAKE} ${MFLAGS} -f instbin.mk SRCLIBDIR=${.CURDIR}/../../../lib all
instbin.conf: ${LISTS}
awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf