Message ID | 20250308040451.585561-1-xin@zytor.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v1,1/1] kbuild: Add "make headers" to "make help" output | expand |
On Fri, Mar 07, 2025 at 08:04:51PM -0800, Xin Li (Intel) wrote: > Meanwhile explicitly state that the headers are uapi headers. > > Suggested-by: Borislav Petkov <bp@alien8.de> > Signed-off-by: Xin Li (Intel) <xin@zytor.com> > --- > Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 70bdbf2218fc..8f5aa710105e 100644 > --- a/Makefile > +++ b/Makefile > @@ -1659,7 +1659,8 @@ help: > @echo ' kernelrelease - Output the release version string (use with make -s)' > @echo ' kernelversion - Output the version stored in Makefile (use with make -s)' > @echo ' image_name - Output the image name (use with make -s)' > - @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ > + @echo ' headers - Install sanitised kernel uapi headers to usr/include' ^^^^^^^^^^^ It is INSTALL_HDR_PATH too, try: make O=/tmp/b/ headers for example.
On Sat, Mar 8, 2025 at 1:05 PM Xin Li (Intel) <xin@zytor.com> wrote: > > Meanwhile explicitly state that the headers are uapi headers. There are many internal-use targets, which are not documented in the help message. I assume this one is the case. If users want to install UAPI headers, 'headers_install' is the user-visible interface and it is already documented. > Suggested-by: Borislav Petkov <bp@alien8.de> > Signed-off-by: Xin Li (Intel) <xin@zytor.com> > --- > Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 70bdbf2218fc..8f5aa710105e 100644 > --- a/Makefile > +++ b/Makefile > @@ -1659,7 +1659,8 @@ help: > @echo ' kernelrelease - Output the release version string (use with make -s)' > @echo ' kernelversion - Output the version stored in Makefile (use with make -s)' > @echo ' image_name - Output the image name (use with make -s)' > - @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ > + @echo ' headers - Install sanitised kernel uapi headers to usr/include' > + @echo ' headers_install - Install sanitised kernel uapi headers to INSTALL_HDR_PATH'; \ > echo ' (default: $(INSTALL_HDR_PATH))'; \ > echo '' > @echo 'Static analysers:' > > base-commit: 7eb172143d5508b4da468ed59ee857c6e5e01da6 > -- > 2.48.1 > -- Best Regards Masahiro Yamada
On Sat, Mar 8, 2025 at 7:35 PM Borislav Petkov <bp@alien8.de> wrote: > > On Fri, Mar 07, 2025 at 08:04:51PM -0800, Xin Li (Intel) wrote: > > Meanwhile explicitly state that the headers are uapi headers. > > > > Suggested-by: Borislav Petkov <bp@alien8.de> > > Signed-off-by: Xin Li (Intel) <xin@zytor.com> > > --- > > Makefile | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/Makefile b/Makefile > > index 70bdbf2218fc..8f5aa710105e 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -1659,7 +1659,8 @@ help: > > @echo ' kernelrelease - Output the release version string (use with make -s)' > > @echo ' kernelversion - Output the version stored in Makefile (use with make -s)' > > @echo ' image_name - Output the image name (use with make -s)' > > - @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ > > + @echo ' headers - Install sanitised kernel uapi headers to usr/include' > ^^^^^^^^^^^ > > It is INSTALL_HDR_PATH too, try: > > make O=/tmp/b/ headers > > for example. No. usr/include -- Best Regards Masahiro Yamada
On March 8, 2025 7:12:59 AM PST, Masahiro Yamada <masahiroy@kernel.org> wrote: >On Sat, Mar 8, 2025 at 1:05 PM Xin Li (Intel) <xin@zytor.com> wrote: >> >> Meanwhile explicitly state that the headers are uapi headers. > >There are many internal-use targets, which are not documented in the >help message. >I assume this one is the case. > >If users want to install UAPI headers, 'headers_install' is >the user-visible interface and it is already documented. > > > > > >> Suggested-by: Borislav Petkov <bp@alien8.de> >> Signed-off-by: Xin Li (Intel) <xin@zytor.com> >> --- >> Makefile | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/Makefile b/Makefile >> index 70bdbf2218fc..8f5aa710105e 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -1659,7 +1659,8 @@ help: >> @echo ' kernelrelease - Output the release version string (use with make -s)' >> @echo ' kernelversion - Output the version stored in Makefile (use with make -s)' >> @echo ' image_name - Output the image name (use with make -s)' >> - @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ >> + @echo ' headers - Install sanitised kernel uapi headers to usr/include' >> + @echo ' headers_install - Install sanitised kernel uapi headers to INSTALL_HDR_PATH'; \ >> echo ' (default: $(INSTALL_HDR_PATH))'; \ >> echo '' >> @echo 'Static analysers:' >> >> base-commit: 7eb172143d5508b4da468ed59ee857c6e5e01da6 >> -- >> 2.48.1 >> > > >-- >Best Regards >Masahiro Yamada > Unfortunately it seems users haven't been following that :(
On Sun, Mar 09, 2025 at 12:15:21AM +0900, Masahiro Yamada wrote: > > It is INSTALL_HDR_PATH too, try: > > > > make O=/tmp/b/ headers > > > > for example. > > No. usr/include Yes, ok, "usr/include" is a relative path but it should at least say *relative* to the current output directory so that it is perfectly clear.
On Sat, Mar 08, 2025 at 08:01:56AM -0800, H. Peter Anvin wrote:
> Unfortunately it seems users haven't been following that :(
If by "users haven't been following that" you mean they've been doing
make kselftest
in order to run selftests and *that* thing builds headers, then yes, you're
right.
Oh look:
PHONY += kselftest
kselftest: headers
^^^^^^^^
$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests
:-P
On March 8, 2025 8:41:51 AM PST, Borislav Petkov <bp@alien8.de> wrote: >On Sat, Mar 08, 2025 at 08:01:56AM -0800, H. Peter Anvin wrote: >> Unfortunately it seems users haven't been following that :( > >If by "users haven't been following that" you mean they've been doing > >make kselftest > >in order to run selftests and *that* thing builds headers, then yes, you're >right. > >Oh look: > >PHONY += kselftest >kselftest: headers > ^^^^^^^^ > $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests > >:-P > That's not the only one. Point being that users have been using it so it is better to make it official than breaking it.
On Sat, Mar 08, 2025 at 08:47:44AM -0800, H. Peter Anvin wrote: > That's not the only one. Point being that users have been using it so it is > better to make it official than breaking it. Yap, it ain't internal anymore - that's for sure.
On 3/8/2025 7:12 AM, Masahiro Yamada wrote: > On Sat, Mar 8, 2025 at 1:05 PM Xin Li (Intel) <xin@zytor.com> wrote: >> >> Meanwhile explicitly state that the headers are uapi headers. > > There are many internal-use targets, which are not documented in the > help message. > I assume this one is the case. > > If users want to install UAPI headers, 'headers_install' is > the user-visible interface and it is already documented. > > hpa and Boris prefer to add it, which I also agree. But ofc it's your call :) If you don't want to add help for "headers", it probably still makes sense to explicitly state that the headers are uapi headers, no? Thanks! Xin > > > >> Suggested-by: Borislav Petkov <bp@alien8.de> >> Signed-off-by: Xin Li (Intel) <xin@zytor.com> >> --- >> Makefile | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/Makefile b/Makefile >> index 70bdbf2218fc..8f5aa710105e 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -1659,7 +1659,8 @@ help: >> @echo ' kernelrelease - Output the release version string (use with make -s)' >> @echo ' kernelversion - Output the version stored in Makefile (use with make -s)' >> @echo ' image_name - Output the image name (use with make -s)' >> - @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ >> + @echo ' headers - Install sanitised kernel uapi headers to usr/include' >> + @echo ' headers_install - Install sanitised kernel uapi headers to INSTALL_HDR_PATH'; \ >> echo ' (default: $(INSTALL_HDR_PATH))'; \ >> echo '' >> @echo 'Static analysers:' >> >> base-commit: 7eb172143d5508b4da468ed59ee857c6e5e01da6 >> -- >> 2.48.1 >> > > > -- > Best Regards > Masahiro Yamada > >
On Mon, Mar 10, 2025 at 3:23 PM Xin Li <xin@zytor.com> wrote: > > On 3/8/2025 7:12 AM, Masahiro Yamada wrote: > > On Sat, Mar 8, 2025 at 1:05 PM Xin Li (Intel) <xin@zytor.com> wrote: > >> > >> Meanwhile explicitly state that the headers are uapi headers. > > > > There are many internal-use targets, which are not documented in the > > help message. > > I assume this one is the case. > > > > If users want to install UAPI headers, 'headers_install' is > > the user-visible interface and it is already documented. > > > > > > hpa and Boris prefer to add it, which I also agree. But ofc it's your > call :) > > If you don't want to add help for "headers", it probably still makes > sense to explicitly state that the headers are uapi headers, no? > > Thanks! > Xin If a help message for "headers" is desired, how about this? headers - Build read-to-install uapi headers in usr/include
On Tue, Mar 11, 2025 at 10:52 AM Masahiro Yamada <masahiroy@kernel.org> wrote: > > On Mon, Mar 10, 2025 at 3:23 PM Xin Li <xin@zytor.com> wrote: > > > > On 3/8/2025 7:12 AM, Masahiro Yamada wrote: > > > On Sat, Mar 8, 2025 at 1:05 PM Xin Li (Intel) <xin@zytor.com> wrote: > > >> > > >> Meanwhile explicitly state that the headers are uapi headers. > > > > > > There are many internal-use targets, which are not documented in the > > > help message. > > > I assume this one is the case. > > > > > > If users want to install UAPI headers, 'headers_install' is > > > the user-visible interface and it is already documented. > > > > > > > > > > hpa and Boris prefer to add it, which I also agree. But ofc it's your > > call :) > > > > If you don't want to add help for "headers", it probably still makes > > sense to explicitly state that the headers are uapi headers, no? > > > > Thanks! > > Xin > > > If a help message for "headers" is desired, how about this? > > headers - Build read-to-install uapi headers in usr/include For clarification, the following is the rationale. Build Installation ------------------------------------- vmlinux install modules modules_install dtbs dtbs_install headers headers_install In Kbuild, the Build and Installation are separate steps, since the latter usually requires the root permission.
On 3/10/2025 7:13 PM, Masahiro Yamada wrote: > On Tue, Mar 11, 2025 at 10:52 AM Masahiro Yamada <masahiroy@kernel.org> wrote: >> >> On Mon, Mar 10, 2025 at 3:23 PM Xin Li <xin@zytor.com> wrote: >>> >>> On 3/8/2025 7:12 AM, Masahiro Yamada wrote: >>>> On Sat, Mar 8, 2025 at 1:05 PM Xin Li (Intel) <xin@zytor.com> wrote: >>>>> >>>>> Meanwhile explicitly state that the headers are uapi headers. >>>> >>>> There are many internal-use targets, which are not documented in the >>>> help message. >>>> I assume this one is the case. >>>> >>>> If users want to install UAPI headers, 'headers_install' is >>>> the user-visible interface and it is already documented. >>>> >>>> >>> >>> hpa and Boris prefer to add it, which I also agree. But ofc it's your >>> call :) >>> >>> If you don't want to add help for "headers", it probably still makes >>> sense to explicitly state that the headers are uapi headers, no? >>> >>> Thanks! >>> Xin >> >> >> If a help message for "headers" is desired, how about this? >> >> headers - Build read-to-install uapi headers in usr/include > > > > > For clarification, the following is the rationale. > > > Build Installation > ------------------------------------- > vmlinux install > modules modules_install > dtbs dtbs_install > headers headers_install > > > > In Kbuild, the Build and Installation are separate steps, > since the latter usually requires the root permission. > Oh, I didn't realize, thanks for making it clear. Xin
On 3/10/2025 6:52 PM, Masahiro Yamada wrote: > On Mon, Mar 10, 2025 at 3:23 PM Xin Li <xin@zytor.com> wrote: >> >> On 3/8/2025 7:12 AM, Masahiro Yamada wrote: >>> On Sat, Mar 8, 2025 at 1:05 PM Xin Li (Intel) <xin@zytor.com> wrote: >>>> >>>> Meanwhile explicitly state that the headers are uapi headers. >>> >>> There are many internal-use targets, which are not documented in the >>> help message. >>> I assume this one is the case. >>> >>> If users want to install UAPI headers, 'headers_install' is >>> the user-visible interface and it is already documented. >>> >>> >> >> hpa and Boris prefer to add it, which I also agree. But ofc it's your >> call :) >> >> If you don't want to add help for "headers", it probably still makes >> sense to explicitly state that the headers are uapi headers, no? >> >> Thanks! >> Xin > > > If a help message for "headers" is desired, how about this? > > headers - Build read-to-install uapi headers in usr/include > LGTM. I guess you will make the change right now? Thanks! Xin
On Tue, Mar 11, 2025 at 11:19 AM Xin Li <xin@zytor.com> wrote: > > On 3/10/2025 6:52 PM, Masahiro Yamada wrote: > > On Mon, Mar 10, 2025 at 3:23 PM Xin Li <xin@zytor.com> wrote: > >> > >> On 3/8/2025 7:12 AM, Masahiro Yamada wrote: > >>> On Sat, Mar 8, 2025 at 1:05 PM Xin Li (Intel) <xin@zytor.com> wrote: > >>>> > >>>> Meanwhile explicitly state that the headers are uapi headers. > >>> > >>> There are many internal-use targets, which are not documented in the > >>> help message. > >>> I assume this one is the case. > >>> > >>> If users want to install UAPI headers, 'headers_install' is > >>> the user-visible interface and it is already documented. > >>> > >>> > >> > >> hpa and Boris prefer to add it, which I also agree. But ofc it's your > >> call :) > >> > >> If you don't want to add help for "headers", it probably still makes > >> sense to explicitly state that the headers are uapi headers, no? > >> > >> Thanks! > >> Xin > > > > > > If a help message for "headers" is desired, how about this? > > > > headers - Build read-to-install uapi headers in usr/include > > > > LGTM. > > I guess you will make the change right now? > I will not do it myself, but I just suggested a change for v2.
On 3/10/2025 7:40 PM, Masahiro Yamada wrote: >>> If a help message for "headers" is desired, how about this? >>> >>> headers - Build read-to-install uapi headers in usr/include >>> >> >> LGTM. >> >> I guess you will make the change right now? >> > > I will not do it myself, but I just suggested a change for v2. > I will take care of it then.
diff --git a/Makefile b/Makefile index 70bdbf2218fc..8f5aa710105e 100644 --- a/Makefile +++ b/Makefile @@ -1659,7 +1659,8 @@ help: @echo ' kernelrelease - Output the release version string (use with make -s)' @echo ' kernelversion - Output the version stored in Makefile (use with make -s)' @echo ' image_name - Output the image name (use with make -s)' - @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ + @echo ' headers - Install sanitised kernel uapi headers to usr/include' + @echo ' headers_install - Install sanitised kernel uapi headers to INSTALL_HDR_PATH'; \ echo ' (default: $(INSTALL_HDR_PATH))'; \ echo '' @echo 'Static analysers:'
Meanwhile explicitly state that the headers are uapi headers. Suggested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Xin Li (Intel) <xin@zytor.com> --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) base-commit: 7eb172143d5508b4da468ed59ee857c6e5e01da6