Commit 806d61d6 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Greg Kroah-Hartman

kbuild: rpm-pkg: keep spec file until make mrproper

commit af60e207 upstream.

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's avatarMasahiro Yamada <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent abc5896b
......@@ -55,6 +55,11 @@ modules.builtin
# RPM spec file (make rpm-pkg)
# Debian directory (make deb-pkg)
......@@ -50,7 +50,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
# ---------------------------------------------------------------------------
......@@ -59,7 +58,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
# ---------------------------------------------------------------------------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment