summaryrefslogtreecommitdiffstats
path: root/sys/modules
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2007-04-10 20:33:31 +0000
committermarius <marius@FreeBSD.org>2007-04-10 20:33:31 +0000
commitce73c62fd03582a774d03d95686f1634038b24e2 (patch)
treec49d840d167ed05be8add19062a6a6c83e63d958 /sys/modules
parent2cece7cde24859369fba558ea30f783e68dd772a (diff)
downloadFreeBSD-src-ce73c62fd03582a774d03d95686f1634038b24e2.zip
FreeBSD-src-ce73c62fd03582a774d03d95686f1634038b24e2.tar.gz
On i386 compile the back-end with EISA support as well as the EISA
front-end if the dpt(4) module is built along with a kernel that includes eisa(4) or when compiling it stand-alone (logic based on the corresponding ISA logic in sys/modules/sound/sound/Makefile). As as side-effect this fixes the stand-alone build of the dpt(4) module after dpt.h 1.17, dpt_eisa.c 1.22 and dpt_scsi.c 1.55. Breakage reported by: n_hibma
Diffstat (limited to 'sys/modules')
-rw-r--r--sys/modules/dpt/Makefile26
1 files changed, 23 insertions, 3 deletions
diff --git a/sys/modules/dpt/Makefile b/sys/modules/dpt/Makefile
index 3f681b0..6f66d44 100644
--- a/sys/modules/dpt/Makefile
+++ b/sys/modules/dpt/Makefile
@@ -5,10 +5,30 @@
KMOD= dpt
SRCS= dpt_scsi.c dpt.h \
dpt_pci.c pci_if.h \
- opt_dpt.h \
+ opt_dpt.h opt_eisa.h \
opt_cam.h opt_scsi.h \
device_if.h bus_if.h
-#SRCS+= dpt_eisa.c eisa_if.h \
-#SRCS+= dpt_isa.c isa_if.h \
+
+.if ${MACHINE} != "i386"
+# Create an empty opt_eisa.h in order to keep kmod.mk from linking in an
+# existing one from KERNBUILDDIR which possibly has DEV_EISA defined so
+# dpt.ko is always built without EISA support.
+opt_eisa.h:
+ :> ${.TARGET}
+.else
+.if !defined(KERNBUILDDIR)
+SRCS+= dpt_eisa.c eisa_if.h
+#SRCS+= dpt_isa.c isa_if.h
+
+opt_eisa.h:
+ echo "#define DEV_EISA 1" > ${.TARGET}
+.else
+DEV_EISA!= sed -n '/DEV_EISA/p' ${KERNBUILDDIR}/opt_eisa.h
+.if !empty(DEV_EISA)
+SRCS+= dpt_eisa.c eisa_if.h
+.endif
+#SRCS+= dpt_isa.c isa_if.h
+.endif
+.endif
.include <bsd.kmod.mk>
OpenPOWER on IntegriCloud