kbuild: rpm-pkg: generate kernel.spec in rpmbuild/SPECS/

kernel.spec is the last piece that resides outside the rpmbuild/
directory. Move all the RPM-related files to rpmbuild/ consistently.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
This commit is contained in:
Masahiro Yamada
2023-09-30 19:38:47 +09:00
parent 4074532758
commit ffa46bbc58
5 changed files with 12 additions and 7 deletions

View File

@@ -69,9 +69,9 @@ $(linux-tarballs): .tmp_HEAD FORCE
# ---------------------------------------------------------------------------
quiet_cmd_mkspec = GEN $@
cmd_mkspec = $(srctree)/scripts/package/mkspec > $@
cmd_mkspec = $(srctree)/scripts/package/mkspec $@
kernel.spec: FORCE
rpmbuild/SPECS/kernel.spec: FORCE
$(call cmd,mkspec)
PHONY += rpm-sources
@@ -88,8 +88,8 @@ srcrpm-pkg: private build-type := s
binrpm-pkg: private build-type := b
rpm-pkg srcrpm-pkg: rpm-sources
rpm-pkg srcrpm-pkg binrpm-pkg: kernel.spec
+$(strip rpmbuild -b$(build-type) kernel.spec \
rpm-pkg srcrpm-pkg binrpm-pkg: rpmbuild/SPECS/kernel.spec
+$(strip rpmbuild -b$(build-type) rpmbuild/SPECS/kernel.spec \
--define='_topdir $(abspath rpmbuild)' \
$(if $(filter a b, $(build-type)), \
--target $(UTS_MACHINE)-linux --build-in-place --noprep --define='_smp_mflags %{nil}' \