diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-09-30 12:38:47 +0200 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-10-03 13:49:09 +0200 |
commit | ffa46bbc5892ebba8a95c839dc302cad7f22c209 (patch) | |
tree | ce75b6f4fb256c59c02c6631c3b34a65ce707f32 /scripts | |
parent | modpost: Optimize symbol search from linear to binary search (diff) | |
download | linux-ffa46bbc5892ebba8a95c839dc302cad7f22c209.tar.xz linux-ffa46bbc5892ebba8a95c839dc302cad7f22c209.zip |
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>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.package | 8 | ||||
-rwxr-xr-x | scripts/package/mkspec | 6 | ||||
-rwxr-xr-x | scripts/remove-stale-files | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/scripts/Makefile.package b/scripts/Makefile.package index 2bcab02da965..05b8c3e29aac 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -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}' \ diff --git a/scripts/package/mkspec b/scripts/package/mkspec index d41608efb747..ce201bfa8377 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -9,6 +9,12 @@ # Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net> # +output=$1 + +mkdir -p "$(dirname "${output}")" + +exec >"${output}" + if grep -q CONFIG_MODULES=y include/config/auto.conf; then echo '%define with_devel %{?_without_devel: 0} %{?!_without_devel: 1}' else diff --git a/scripts/remove-stale-files b/scripts/remove-stale-files index 8b1a636f8543..385610fe3936 100755 --- a/scripts/remove-stale-files +++ b/scripts/remove-stale-files @@ -38,4 +38,4 @@ rm -rf include/ksym find . -name '*.usyms' | xargs rm -f -rm -f binkernel.spec +rm -f *.spec |