Get the name of the current kernel only once.

This commit is contained in:
fredb 2000-07-31 20:30:15 +00:00
parent 2e4a639f87
commit ec53f99c60

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.25 2000/07/20 13:30:59 rh Exp $
# $NetBSD: Makefile,v 1.26 2000/07/31 20:30:15 fredb Exp $
# FreeBSD Id: Makefile,v 1.7 1997/08/10 22:31:27 fenner Exp
#
@ -21,12 +21,14 @@ NO_BIN_ON_FTP= ${RESTRICTED}
NO_WRKSUBDIR= yes
EXTRACT_CMD= ${DOWNLOADED_DISTFILE} >/dev/null
KERNEL= /`env "PATH=${PATH}:/sbin:/usr/sbin" sysctl -n machdep.booted_kernel`
.ifndef KERNEL
KERNEL!= env "PATH=${PATH}:/sbin:/usr/sbin" sysctl -n machdep.booted_kernel
.endif
pre-extract:
@if (${NM} ${KERNEL} | ${GREP} -q compat_12 && \
${NM} ${KERNEL} | ${GREP} -q exec_nomid && \
${NM} ${KERNEL} | ${GREP} -q exec_aout); then ${TRUE}; \
@if (${NM} /${KERNEL} | ${GREP} -q compat_12 && \
${NM} /${KERNEL} | ${GREP} -q exec_nomid && \
${NM} /${KERNEL} | ${GREP} -q exec_aout); then ${TRUE}; \
else \
${ECHO} "****************************************************************";\
${ECHO} Make can not proceed! In order to extract \(and run\); \