Changeset View
Changeset View
Standalone View
Standalone View
share/mk/kmod.opts.mk
- This file was added.
# $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.opts.mk) | |||||
imp: we have this list in 4 places now, including inside of the kernel conf dir. This makes it 5. | |||||
jhbAuthorUnsubmitted Done Inline ActionsThe one in sys/conf/kmod.mk is different (fewer directories) FWIW. I was only aware of this being the third place (bsd.kmod.mk and sys/conf/kmod.mk being the others). Looks like sys/conf/dtb.build.mk which uses the shorter list of dirs from sys/conf/kmod.mk is the 4th. So we have 2 lists each duplicated twice, and 3 different flavors of the nested '.if'. jhb: The one in sys/conf/kmod.mk is different (fewer directories) FWIW. I was only aware of this… | |||||
impUnsubmitted Not Done Inline Actionsyea, that's super-ugly :( imp: yea, that's super-ugly :(
I have bsd.sysdir.mk that I've written.
I'll post a followup after… | |||||
SYSDIR= ${_dir:tA} | |||||
.endif | |||||
.endfor | |||||
.endif | |||||
.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ | |||||
!exists(${SYSDIR}/conf/kmod.opts.mk) | |||||
.error Unable to locate the kernel source tree. Set SYSDIR to override. | |||||
.endif | |||||
.endif | |||||
.include "${SYSDIR}/conf/kmod.opts.mk" |
we have this list in 4 places now, including inside of the kernel conf dir. This makes it 5. Any chance you can make it just one too?