summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Makefile2
-rw-r--r--scripts/Makefile.package4
-rwxr-xr-xscripts/remove-stale-files2
4 files changed, 6 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 9fd4c9533b3d..0bbae167bf93 100644
--- a/.gitignore
+++ b/.gitignore
@@ -74,7 +74,7 @@ modules.order
#
# RPM spec file (make rpm-pkg)
#
-/*.spec
+/kernel.spec
/rpmbuild/
#
diff --git a/Makefile b/Makefile
index 8533ba64713c..4425d87dd2fa 100644
--- a/Makefile
+++ b/Makefile
@@ -1610,7 +1610,7 @@ MRPROPER_FILES += include/config include/generated \
certs/signing_key.pem \
certs/x509.genkey \
vmlinux-gdb.py \
- *.spec rpmbuild \
+ kernel.spec rpmbuild \
rust/libmacros.so
# clean - Delete most, but leave enough to build external modules
diff --git a/scripts/Makefile.package b/scripts/Makefile.package
index c36ae03d6002..be9602fa98da 100644
--- a/scripts/Makefile.package
+++ b/scripts/Makefile.package
@@ -86,9 +86,9 @@ srcrpm-pkg: linux.tar.gz
# ---------------------------------------------------------------------------
PHONY += binrpm-pkg
binrpm-pkg:
- $(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec
+ $(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/kernel.spec
+rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
- $(UTS_MACHINE)-linux -bb $(objtree)/binkernel.spec \
+ $(UTS_MACHINE)-linux -bb $(objtree)/kernel.spec \
--build-in-place --noprep --define='_smp_mflags %{nil}' --without devel \
--define='make $(MAKE)'
diff --git a/scripts/remove-stale-files b/scripts/remove-stale-files
index f3659ea0335b..8b1a636f8543 100755
--- a/scripts/remove-stale-files
+++ b/scripts/remove-stale-files
@@ -37,3 +37,5 @@ rm -f .scmversion
rm -rf include/ksym
find . -name '*.usyms' | xargs rm -f
+
+rm -f binkernel.spec