diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-08-07 22:14:14 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-08-09 08:50:18 -0400 |
commit | 3fca1700c4c38aaec1cea0c143b0ff8da029fd9c (patch) | |
tree | e43ee2118739d7d4ce63dbfb60b665c90e917731 | |
parent | 0004438a165b18d4a611745f12e328e65f46c8f2 (diff) |
kbuild: make samples really depend on headers_install
Kernel headers must be installed into $(objtree)/usr/include to avoid
the build failure of samples.
Commit ddea05fa148b ("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>
-rw-r--r-- | Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1010,9 +1010,10 @@ ifdef CONFIG_GDB_SCRIPTS | |||
1010 | endif | 1010 | endif |
1011 | +$(call if_changed,link-vmlinux) | 1011 | +$(call if_changed,link-vmlinux) |
1012 | 1012 | ||
1013 | # Build samples along the rest of the kernel | 1013 | # Build samples along the rest of the kernel. This needs headers_install. |
1014 | ifdef CONFIG_SAMPLES | 1014 | ifdef CONFIG_SAMPLES |
1015 | vmlinux-dirs += samples | 1015 | vmlinux-dirs += samples |
1016 | samples: headers_install | ||
1016 | endif | 1017 | endif |
1017 | 1018 | ||
1018 | # The actual objects are generated when descending, | 1019 | # The actual objects are generated when descending, |