Skip to content

Commit dd92478

Browse files
author
Nicolas Pitre
committed
kbuild: build sample modules along with the rest of the kernel
Make sample modules in parallel with the rest of the kernel rather than having them built from the vmlinux target. This makes the build slightly faster, and those modules are properly considered when adjust_autoksyms.sh is executed. Signed-off-by: Nicolas Pitre <nico@linaro.org>
1 parent 23121ca commit dd92478

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -940,9 +940,6 @@ endif
940940
ifdef CONFIG_HEADERS_CHECK
941941
$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
942942
endif
943-
ifdef CONFIG_SAMPLES
944-
$(Q)$(MAKE) $(build)=samples
945-
endif
946943
ifdef CONFIG_BUILD_DOCSRC
947944
$(Q)$(MAKE) $(build)=Documentation
948945
endif
@@ -960,6 +957,11 @@ PHONY += autoksyms_recursive
960957
include/generated/autoksyms.h: FORCE
961958
$(Q)$(CONFIG_SHELL) scripts/adjust_autoksyms.sh true
962959

960+
# Build samples along the rest of the kernel
961+
ifdef CONFIG_SAMPLES
962+
vmlinux-dirs += samples
963+
endif
964+
963965
# The actual objects are generated when descending,
964966
# make sure no implicit rule kicks in
965967
$(sort $(vmlinux-deps)): $(vmlinux-dirs) ;

0 commit comments

Comments
 (0)