summaryrefslogtreecommitdiff
path: root/etc/Makefile
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2011-07-22 09:30:55 +0000
committerMarc Espie <espie@cvs.openbsd.org>2011-07-22 09:30:55 +0000
commita9b4c06ebf41cc104b32ac8b53f1216d9f43366b (patch)
tree0d13349816cc5f7b911f32ff2e178f3a11e5d3a6 /etc/Makefile
parent180b3f32fdc59ec916e5236e2f6f2445b1698cc7 (diff)
unify kernel building on various platforms.
feedback from miod@ and deraadt@
Diffstat (limited to 'etc/Makefile')
-rw-r--r--etc/Makefile25
1 files changed, 22 insertions, 3 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 2972cc44bf8..19faf416def 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.308 2011/07/17 00:28:04 david Exp $
+# $OpenBSD: Makefile,v 1.309 2011/07/22 09:30:54 espie Exp $
TZDIR= /usr/share/zoneinfo
LOCALTIME= Canada/Mountain
@@ -6,10 +6,27 @@ MTREEDIR= /etc/mtree
NOOBJ=
+KERNELS = GENERIC bsd
+
.if exists(etc.${MACHINE}/Makefile.inc)
.include "etc.${MACHINE}/Makefile.inc"
.endif
+.for CONF K in ${KERNELS}
+. if !target($K)
+$K:
+ cd ../sys/arch/${MACHINE}/conf && config ${CONF}
+ cd ../sys/arch/${MACHINE}/compile/${CONF} && \
+ ${MAKE} clean && exec ${MAKE}
+. endif
+ALL_KERNELS += $K
+.endfor
+
+kernels: bootblocks ${ALL_KERNELS}
+.for CONF K in ${KERNELS}
+ cp ../sys/arch/${MACHINE}/compile/${CONF}/bsd ${RELEASEDIR}/$K
+.endfor
+
# -rw-r--r--
BINOWN= root
BINGRP= wheel
@@ -295,7 +312,7 @@ release-sets:
sha:
-cd ${RELEASEDIR}; \
- sum -a sha256 INSTALL.`arch -ks` ${MDEXT} ${MISETS} > SHA256
+ sum -a sha256 INSTALL.`arch -ks` ${ALL_KERNELS} ${MDEXT} ${MISETS} > SHA256
release: distribution kernels release-sets distrib sha
@@ -319,7 +336,9 @@ update-moduli:
) > moduli
.PHONY: distribution-etc-root-var distribution distrib-dirs \
- release allarchs kernels release-sets m4 install-mtree
+ release allarchs kernels release-sets m4 install-mtree \
+ bootblocks ${ALL_KERNELS}
+
SUBDIR+= etc.alpha etc.amd64 etc.armish etc.aviion etc.hp300 etc.hppa
SUBDIR+= etc.hppa64 etc.i386 etc.landisk etc.loongson etc.luna88k