Re: [OS-BUILD PATCH] Revert "Merge branch 'ark-make-help' into 'os-build'"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jonathan Toppins on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2158#note_1180311795

It won't work without the second colon either as make doesn't like rules that
rewrite previously defined rules. The issue is the upstream kernel Makefile is
included and the help target is being defined. The solution is to not define
the `help:` target when Makefile is included.

Another possible solution is to use submake for all targets, maybe something
like:

```
# if only upstream goals or empty in $(MAKECMDGOALS)
%:
    $(MAKE) -f Makefile $(MAKECMDGOALS)

# else
help:
    # do help goal

_OUTPUT := "."
# this section is needed in order to make O= to work
ifeq ("$(origin O)", "command line")
  _OUTPUT := "$(abspath $(O))"
  _EXTRA_ARGS := O=$(_OUTPUT)
endif
dist-%::
        $(MAKE) -C redhat $(@) $(_EXTRA_ARGS)

distg-%::
        $(MAKE) -C redhat $(@) $(_EXTRA_ARGS)
# endif
```

This obviously prevents someone from doing something like `make dist-brew
mrproper`, I don't know how many are doing that.

A longer term solution is to convince upstream to reserve the `dist%:` target
namespace and use an optional file `scripts/Makefile.dist` which would
implement the `dist%` targets. Then the standard upstream help and other
infrastructure could be directly extended to present more information if this
optional Makefile.dist file exists.
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux