History

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.

Masahiro Yamada committed 3 years ago

Commit ffa46bb1 parent 40745325 files · +12 −7Browse files

Showing the changes to scripts (3 of 5 files). Show all

Unified · Split

3 files
  1. scripts/Makefile.package +4 −4
  2. scripts/package/mkspec +6 −0
  3. scripts/remove-stale-files +1 −1
scripts/Makefile.package+4−4
@@ -69,9 +69,9 @@ $(linux-tarballs): .tmp_HEAD FORCE · 68 unmodified lines
69# ---------------------------------------------------------------------------69# ---------------------------------------------------------------------------
70 70
71quiet_cmd_mkspec = GEN $@71quiet_cmd_mkspec = GEN $@
72 cmd_mkspec = $(srctree)/scripts/package/mkspec > $@72 cmd_mkspec = $(srctree)/scripts/package/mkspec $@
73 73
74kernel.spec: FORCE74rpmbuild/SPECS/kernel.spec: FORCE
75 $(call cmd,mkspec)75 $(call cmd,mkspec)
76 76
77PHONY += rpm-sources77PHONY += rpm-sources
@@ -88,8 +88,8 @@ srcrpm-pkg: private build-type := s · 10 unmodified lines
88binrpm-pkg: private build-type := b88binrpm-pkg: private build-type := b
89 89
90rpm-pkg srcrpm-pkg: rpm-sources90rpm-pkg srcrpm-pkg: rpm-sources
91rpm-pkg srcrpm-pkg binrpm-pkg: kernel.spec91rpm-pkg srcrpm-pkg binrpm-pkg: rpmbuild/SPECS/kernel.spec
92 +$(strip rpmbuild -b$(build-type) kernel.spec \92 +$(strip rpmbuild -b$(build-type) rpmbuild/SPECS/kernel.spec \
93 --define='_topdir $(abspath rpmbuild)' \93 --define='_topdir $(abspath rpmbuild)' \
94 $(if $(filter a b, $(build-type)), \94 $(if $(filter a b, $(build-type)), \
95 --target $(UTS_MACHINE)-linux --build-in-place --noprep --define='_smp_mflags %{nil}' \95 --target $(UTS_MACHINE)-linux --build-in-place --noprep --define='_smp_mflags %{nil}' \
scripts/package/mkspec+6−0
@@ -9,6 +9,12 @@ · 8 unmodified lines
9# Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>9# Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>
10#10#
11 11
12output=$1
13
14mkdir -p "$(dirname "${output}")"
15
16exec >"${output}"
17
12if grep -q CONFIG_MODULES=y include/config/auto.conf; then18if grep -q CONFIG_MODULES=y include/config/auto.conf; then
13echo '%define with_devel %{?_without_devel: 0} %{?!_without_devel: 1}'19echo '%define with_devel %{?_without_devel: 0} %{?!_without_devel: 1}'
14else20else
scripts/remove-stale-files+1−1
@@ -38,4 +38,4 @@ rm -rf include/ksym · 37 unmodified lines
38 38
39find . -name '*.usyms' | xargs rm -f39find . -name '*.usyms' | xargs rm -f
40 40
41rm -f binkernel.spec41rm -f *.spec