Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107429218
D22144.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D22144.diff
View Options
Index: head/share/mk/bsd.dtb.mk
===================================================================
--- head/share/mk/bsd.dtb.mk
+++ head/share/mk/bsd.dtb.mk
@@ -1,22 +1,6 @@
# $FreeBSD$
-# Search for kernel source tree in standard places.
-.if empty(KERNBUILDDIR)
-.if !defined(SYSDIR)
-.for _dir in ${SRCTOP:D${SRCTOP}/sys} \
- ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
- ${.CURDIR}/../../../../.. /sys /usr/src/sys
-.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
-SYSDIR= ${_dir}
-.endif
-.endfor
-.endif
-.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
- !exists(${SYSDIR}/conf/kmod.mk)
-.error Unable to locate the kernel source tree. Set SYSDIR to override.
-.endif
-.endif
-
+.include <bsd.sysdir.mk>
.include "${SYSDIR}/conf/dtb.mk"
.include <bsd.sys.mk>
Index: head/share/mk/bsd.kmod.mk
===================================================================
--- head/share/mk/bsd.kmod.mk
+++ head/share/mk/bsd.kmod.mk
@@ -1,20 +1,4 @@
# $FreeBSD$
-# Search for kernel source tree in standard places.
-.if empty(KERNBUILDDIR)
-.if !defined(SYSDIR)
-.for _dir in ${SRCTOP:D${SRCTOP}/sys} \
- ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
- ${.CURDIR}/../../../../.. /sys /usr/src/sys
-.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
-SYSDIR= ${_dir:tA}
-.endif
-.endfor
-.endif
-.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
- !exists(${SYSDIR}/conf/kmod.mk)
-.error Unable to locate the kernel source tree. Set SYSDIR to override.
-.endif
-.endif
-
+.include <bsd.sysdir.mk>
.include "${SYSDIR}/conf/kmod.mk"
Index: head/share/mk/bsd.sysdir.mk
===================================================================
--- head/share/mk/bsd.sysdir.mk
+++ head/share/mk/bsd.sysdir.mk
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+# Search for kernel source tree in standard places.
+.if !defined(SYSDIR)
+.for _dir in ${SRCTOP:D${SRCTOP}/sys} \
+ ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
+ ${.CURDIR}/../../../../.. /sys /usr/src/sys
+.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
+SYSDIR= ${_dir:tA}
+.endif
+.endfor
+.endif
+.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
+ !exists(${SYSDIR}/conf/kmod.mk)
+.error Unable to locate the kernel source tree. Set SYSDIR to override.
+.endif
Index: head/sys/conf/dtb.build.mk
===================================================================
--- head/sys/conf/dtb.build.mk
+++ head/sys/conf/dtb.build.mk
@@ -11,12 +11,7 @@
.if defined(S)
SYSDIR= ${S}
.else
-# Search for kernel source tree in standard places.
-.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys
-.if exists(${_dir}/kern/)
-SYSDIR= ${_dir:tA}
-.endif
-.endfor
+.include <bsd.sysdir.mk>
.endif # defined(S)
.endif # defined(SYSDIR)
Index: head/sys/conf/kmod.mk
===================================================================
--- head/sys/conf/kmod.mk
+++ head/sys/conf/kmod.mk
@@ -79,21 +79,7 @@
.include "kern.opts.mk"
.include <bsd.compiler.mk>
.include "config.mk"
-
-# Search for kernel source tree in standard places.
-.if empty(KERNBUILDDIR)
-.if !defined(SYSDIR)
-.for _dir in ${SRCTOP:D${SRCTOP}/sys} \
- ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys
-.if !defined(SYSDIR) && exists(${_dir}/kern/)
-SYSDIR= ${_dir:tA}
-.endif
-.endfor
-.endif
-.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/)
-.error "can't find kernel source tree"
-.endif
-.endif
+.include <bsd.sysdir.mk>
.SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S .m
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 15, 1:09 AM (9 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15803525
Default Alt Text
D22144.diff (3 KB)
Attached To
Mode
D22144: Introduce bsd.sysdir.mk to consolidate looking for the kernel.
Attached
Detach File
Event Timeline
Log In to Comment