aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-29 21:10:10 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-11-14 09:19:01 -0500
commitaf60e207087975d069858741c44ed4f450330ac4 (patch)
treeb02c13125c39289aa7838c16157681c3e5bc634b
parent606625be47bc87b6fab0af10cd57aaa675cb9e42 (diff)
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>
-rw-r--r--.gitignore5
-rw-r--r--scripts/package/Makefile4
2 files changed, 7 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 0c39aa20b6ba..4f034b853d7d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,11 @@ Module.symvers
54/Module.markers 54/Module.markers
55 55
56# 56#
57# RPM spec file (make rpm-pkg)
58#
59/*.spec
60
61#
57# Debian directory (make deb-pkg) 62# Debian directory (make deb-pkg)
58# 63#
59/debian/ 64/debian/
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
51 $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec 51 $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec
52 $(call cmd,src_tar,$(KERNELPATH),kernel.spec) 52 $(call cmd,src_tar,$(KERNELPATH),kernel.spec)
53 +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz 53 +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
54 rm $(KERNELPATH).tar.gz kernel.spec
55 54
56# binrpm-pkg 55# binrpm-pkg
57# --------------------------------------------------------------------------- 56# ---------------------------------------------------------------------------
@@ -60,7 +59,8 @@ binrpm-pkg: FORCE
60 $(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec 59 $(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec
61 +rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \ 60 +rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
62 $(UTS_MACHINE) -bb $(objtree)/binkernel.spec 61 $(UTS_MACHINE) -bb $(objtree)/binkernel.spec
63 rm binkernel.spec 62
63clean-files += $(objtree)/*.spec
64 64
65# Deb target 65# Deb target
66# --------------------------------------------------------------------------- 66# ---------------------------------------------------------------------------