On Thu, Nov 24, 2022 at 12:32 AM Don Zickus <dzickus@xxxxxxxxxx> wrote: > > Fedora adds a directory to its source git tree to provide packaging > information[1] specific for its distro. We would like to propagate our > 'help' section to the toplevel to be seen by 'make help' as it isn't > obvious to users to use 'make dist-help'[2]. > > Instead of keeping Fedora changes local, I am proposing a generic > mechanism for other distros to use if they would like. The change looks > for a distro directory and leverages that Makefile if it exists. > Otherwise it is ignored. > > [1] - https://gitlab.com/cki-project/kernel-ark/-/tree/os-build/redhat > [2] - https://gitlab.com/cki-project/kernel-ark/-/blob/os-build/redhat/Makefile#L809 > > Signed-off-by: Jonathan Toppins <jtoppins@xxxxxxxxxx> > Signed-off-by: Don Zickus <dzickus@xxxxxxxxxx> > > ---- > This patch is more of a conversation starter than anything. > > I think other distros might find this useful and examples of what we would > populate the directory with can be found in [1]. > > Thoughts? I do not like to merge any code that is irrelevant to the upstream. > --- > Makefile | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/Makefile b/Makefile > index 6f846b1f2618f..45fdb18dde46f 100644 > --- a/Makefile > +++ b/Makefile > @@ -1635,6 +1635,16 @@ distclean: mrproper > %pkg: include/config/kernel.release FORCE > $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@ > > +# Distribution of the kernel > +# --------------------------------------------------------------------------- > + > +dist%: FORCE > + @if ! test -f $(srctree)/distro/Makefile; then \ > + echo 'No distribution targets defined'; \ > + exit 1; \ > + fi > + $(Q)$(MAKE) -C $(srctree)/distro $@ > + > # Brief documentation of the typical targets used > # --------------------------------------------------------------------------- > > @@ -1732,6 +1742,11 @@ help: > @echo '' > @echo 'Kernel packaging:' > @$(MAKE) -f $(srctree)/scripts/Makefile.package help > + @if test -f $(srctree)/distro/Makefile; then \ > + echo ''; \ > + echo 'Distro targets:'; \ > + $(MAKE) -C $(srctree)/distro dist-help; \ > + fi > @echo '' > @echo 'Documentation targets:' > @$(MAKE) -f $(srctree)/Documentation/Makefile dochelp > -- > 2.38.1 > -- Best Regards Masahiro Yamada