From 1e9defe45aadaca746d25b1094459d7327447daf Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Mon, 4 Sep 2006 07:40:53 +0000 Subject: [PATCH] If building the module as part of the kernel build, determine the "device isa" presence out of the opt_isa.h in the kernel build directory, rather than always assuming its presence. sparc64 is still special cased and is not affected by this change. Noticed by: bde --- sys/modules/sound/sound/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/modules/sound/sound/Makefile b/sys/modules/sound/sound/Makefile index f2e6eae7676a..5b96cb43461d 100644 --- a/sys/modules/sound/sound/Makefile +++ b/sys/modules/sound/sound/Makefile @@ -24,10 +24,17 @@ EXPORT_SYMS= YES # XXX evaluate opt_isa.h: :> ${.TARGET} .else +.if !defined(KERNBUILDDIR) SRCS+= sndbuf_dma.c opt_isa.h: echo "#define DEV_ISA 1" > ${.TARGET} +.else +DEV_ISA!= sed -n '/DEV_ISA/p' ${KERNBUILDDIR}/opt_isa.h +.if !empty(DEV_ISA) +SRCS+= sndbuf_dma.c +.endif +.endif .endif .include