From: Prarit Bhargava <pra...@redhat.com> spec: Fix separate tools build
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2054579 Upstream Status: RHEL only If we re building only tools without kernel, we need to generate config headers and prepare tree for modules building. The modules_prepare target will cover both. Signed-off-by: Jiri Olsa <jo...@redhat.com> Signed-off-by: Prarit Bhargava <pra...@redhat.com> diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100755 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -2344,6 +2344,14 @@ popd # in the source tree. We installed them previously to $RPM_BUILD_ROOT/usr # but there's no way to tell the Makefile to take them from there. %{make} %{?_smp_mflags} headers_install + +# If we re building only tools without kernel, we need to generate config +# headers and prepare tree for modules building. The modules_prepare target +# will cover both. +if [ ! -f include/generated/autoconf.h ]; then + %{make} %{?_smp_mflags} modules_prepare +fi + %{make} %{?_smp_mflags} ARCH=$Arch V=1 M=samples/bpf/ || true # Prevent bpf selftests to build bpftool repeatedly: -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2021 _______________________________________________ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org 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@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue