Skip to content

Commit

Permalink
kbuild: make samples really depend on headers_install
Browse files Browse the repository at this point in the history
Kernel headers must be installed into $(objtree)/usr/include to avoid
the build failure of samples.

Commit ddea05f ("kbuild: make samples depend on headers_install")
addressed this, but "samples/" is only used for the single target build.

"make samples/" properly installs kernel headers, but it does not work
for general building because a phony target "sample" (no trailing slash)
is used.

Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: David Howells <dhowells@redhat.com>
  • Loading branch information
Masahiro Yamada committed Aug 9, 2018
1 parent 0004438 commit 3fca170
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1010,9 +1010,10 @@ ifdef CONFIG_GDB_SCRIPTS
endif
+$(call if_changed,link-vmlinux)

# Build samples along the rest of the kernel
# Build samples along the rest of the kernel. This needs headers_install.
ifdef CONFIG_SAMPLES
vmlinux-dirs += samples
samples: headers_install
endif

# The actual objects are generated when descending,
Expand Down

0 comments on commit 3fca170

Please sign in to comment.