Source
5
5
# This Makefile reads the file arch/$(SRCARCH)/include/(uapi/)/asm/Kbuild
6
6
# and for each file listed in this file with generic-y creates
7
7
# a small wrapper file in arch/$(SRCARCH)/include/generated/(uapi/)/asm.
8
8
9
9
PHONY := all
10
10
all:
11
11
12
12
src := $(subst /generated,,$(obj))
13
13
-include $(src)/Kbuild
14
14
15
+
# $(generic)/Kbuild lists mandatory-y. Exclude um since it is a special case.
16
+
ifneq ($(SRCARCH),um)
17
+
include $(generic)/Kbuild
18
+
endif
19
+
15
20
include scripts/Kbuild.include
16
21
17
22
redundant := $(filter $(mandatory-y) $(generated-y), $(generic-y))
18
23
redundant += $(foreach f, $(generic-y), $(if $(wildcard $(srctree)/$(src)/$(f)),$(f)))
19
24
redundant := $(sort $(redundant))
20
25
$(if $(redundant),\
21
26
$(warning redundant generic-y found in $(src)/Kbuild: $(redundant)))
22
27
23
28
# If arch does not implement mandatory headers, fallback to asm-generic ones.
24
29
mandatory-y := $(filter-out $(generated-y), $(mandatory-y))