summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-30 10:10:10 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-11-14 23:19:01 +0900
commitaf60e207087975d069858741c44ed4f450330ac4 (patch)
treeb02c13125c39289aa7838c16157681c3e5bc634b /scripts
parent606625be47bc87b6fab0af10cd57aaa675cb9e42 (diff)
downloadlinux-stable-af60e207087975d069858741c44ed4f450330ac4.tar.gz
linux-stable-af60e207087975d069858741c44ed4f450330ac4.tar.bz2
linux-stable-af60e207087975d069858741c44ed4f450330ac4.zip
kbuild: rpm-pkg: keep spec file until make mrproper
If build fails during (bin)rpm-pkg, the spec file is not cleaned by anyone until the next successful build of the package. We do not have to immediately delete the spec file in case somebody may want to take a look at it. Instead, make them ignored by git, and cleaned up by make mrproper. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/package/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index b559671d28ca..70eea1ed8c9c 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -51,7 +51,6 @@ rpm-pkg rpm: FORCE
$(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec
$(call cmd,src_tar,$(KERNELPATH),kernel.spec)
+rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
- rm $(KERNELPATH).tar.gz kernel.spec
# binrpm-pkg
# ---------------------------------------------------------------------------
@@ -60,7 +59,8 @@ binrpm-pkg: FORCE
$(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec
+rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
$(UTS_MACHINE) -bb $(objtree)/binkernel.spec
- rm binkernel.spec
+
+clean-files += $(objtree)/*.spec
# Deb target
# ---------------------------------------------------------------------------