Added
Link Here
|
1 |
#- |
2 |
# Copyright (c) 2023 Joshua Kinard <freebsd@kumba.dev> |
3 |
# |
4 |
# SPDX-License-Identifier: BSD-2-Clause |
5 |
# |
6 |
|
7 |
# Process WITHOUT_MODULES in SYSDIR/modules and any subdirectories. |
8 |
# |
9 |
# WITHOUT_MODULES holds a space-separated list of kernel module names |
10 |
# that should not be built or installed. |
11 |
# |
12 |
# Module names are relative to SYSDIR/modules and matching names are |
13 |
# removed from the SUBDIR variable in each Makefile that is processed |
14 |
# under SYSDIR/MODULES. Module names can have one of two forms: |
15 |
# |
16 |
# 1) A name of a top-level directory under SYSDIR/modules, |
17 |
# such as 'ipfw' or 'cd9660'. |
18 |
# |
19 |
# 2) A name of a relative path under SYSDIR/modules, |
20 |
# such as 'usb/atp' or 'hid/xb360gp'. |
21 |
# |
22 |
# This mk file should be included by any Makefile in SYSDIR/modules |
23 |
# that defines a SUBDIR variable with a list of descendant module |
24 |
# subdirectories. |
25 |
# |
26 |
# To include it, add the below directive at the bottom of a Makefile |
27 |
# before any final include directives for "bsd.*.mk": |
28 |
# |
29 |
# .include "${SYSDIR}/conf/kmod.without.mk" |
30 |
# |
31 |
|
32 |
.for kmod in ${WITHOUT_MODULES} |
33 |
. if ${kmod:M*/*} |
34 |
SUBDIR:=${SUBDIR:N${kmod:T}} |
35 |
. else |
36 |
SUBDIR:=${SUBDIR:N${kmod}} |
37 |
. endif |
38 |
.endfor |