kbuild: rpm-pkg: build the kernel in-place for rpm-pkg
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 22 Jul 2023 04:48:04 +0000 (13:48 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 24 Jul 2023 15:59:33 +0000 (00:59 +0900)
Currently, 'make rpm-pkg' always builds the kernel from the pristine
source tree in the ~/rpmbuild/BUILD/ directory.

Build the kernel incrementally just like 'make binrpm-pkg'.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/Makefile.package

index be9602f..bf2da97 100644 (file)
@@ -72,6 +72,7 @@ PHONY += rpm-pkg
 rpm-pkg: srpm = $(shell rpmspec --srpm --query --queryformat='%{name}-%{VERSION}-%{RELEASE}.src.rpm' kernel.spec)
 rpm-pkg: srcrpm-pkg
        +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -rb $(srpm) \
+       --build-in-place --noprep \
        --define='_smp_mflags %{nil}' --define='make $(MAKE)'
 
 # srcrpm-pkg