From: Masahiro Yamada Date: Wed, 8 Aug 2018 02:14:14 +0000 (+0900) Subject: kbuild: make samples really depend on headers_install X-Git-Tag: v4.19-rc1~144^2~3 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3fca1700c4c38aaec1cea0c143b0ff8da029fd9c;p=uclinux-h8%2Flinux.git 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 Signed-off-by: Masahiro Yamada Tested-by: David Howells --- diff --git a/Makefile b/Makefile index d2832a45dffe..bb917de24913 100644 --- a/Makefile +++ b/Makefile @@ -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,