Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/common Augment the `KERNEL' field of MDSETIMAGES; if...
details: https://anonhg.NetBSD.org/src/rev/ed528bd1fd0e
branches: trunk
changeset: 544090:ed528bd1fd0e
user: lukem <lukem%NetBSD.org@localhost>
date: Tue Mar 11 05:14:58 2003 +0000
description:
Augment the `KERNEL' field of MDSETIMAGES; if it contains a `/'
character, use that as the path to the kernel to use, rather than
using the default of "${KERNOBJDIR}/${KERNEL}/netbsd".
(Using this feature means that FILENAME == "-" isn't useful. such is life...)
diffstat:
distrib/common/Makefile.mdset | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
diffs (56 lines):
diff -r 38f108bc7f84 -r ed528bd1fd0e distrib/common/Makefile.mdset
--- a/distrib/common/Makefile.mdset Tue Mar 11 04:49:18 2003 +0000
+++ b/distrib/common/Makefile.mdset Tue Mar 11 05:14:58 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.mdset,v 1.19 2003/01/03 15:34:32 lukem Exp $
+# $NetBSD: Makefile.mdset,v 1.20 2003/03/11 05:14:58 lukem Exp $
#
# Makefile snippet to ${MDSETIMAGE} file system images into kernels
#
@@ -15,8 +15,12 @@
# ${FILENAME}.symbols.gz), and gzipped into
# ${FILENAME}.gz.
#
+# If KERNEL does not contain a `/', use
+# ${KERNOBJDIR}/KERNEL/netbsd as the kernel.
+#
# If FILENAME is "-", use "netbsd-${KERNEL}" as
-# the target name.
+# the target name. This may not be a sensible
+# name if KERNEL contains a `/'.
#
# Optional variables:
# MDSET_RELEASEDIR Where to install release kernels.
@@ -48,7 +52,15 @@
.include <bsd.kernobj.mk>
.for _K _I _F in ${MDSETTARGETS} # {
-_FILENAME:=${_F} # work around obscure issue in make(1)
+
+_KERNEL:=${_K} # (work around obscure issue in make(1))
+.if (${_KERNEL:M*/*} != "")
+_KERNNAME.${_K}.${_F}:= ${_K}
+.else
+_KERNNAME.${_K}.${_F}:= ${KERNOBJDIR}/${_K}/netbsd
+.endif
+
+_FILENAME:=${_F} # (work around obscure issue in make(1))
.if ${_FILENAME} == "-"
_KERNEL.${_K}.${_F}:= netbsd-${_K}
.else
@@ -83,12 +95,12 @@
_POST.${_KERNEL.${_K}.${_F}}:= ${MDSET_POST.${_FILENAME}}
.endif
-${_KERNEL.${_K}.${_F}}: .NOTMAIN ${KERNOBJDIR}/${_K}/netbsd ${_I}
- @echo "mdsetimage: ${KERNOBJDIR}/${_K}/netbsd"
+${_KERNEL.${_K}.${_F}}: .NOTMAIN ${_KERNNAME.${_K}.${_F}} ${_I}
+ @echo "mdsetimage: ${_KERNNAME.${_K}.${_F}}"
@echo " with: ${_I}"
@echo " into: ${.TARGET}"
@rm -f ${.TARGET} ${.TARGET}.symbols.gz
- @cp ${KERNOBJDIR}/${_K}/netbsd ${.TARGET}
+ @cp ${_KERNNAME.${_K}.${_F}} ${.TARGET}
${MDSETIMAGE} -v ${.TARGET} ${_I}
.if !defined(MDSET_NOSYMBOLS.${_FILENAME})
${NM} ${.TARGET} | gzip -9 > ${.TARGET}.symbols.gz
Home |
Main Index |
Thread Index |
Old Index