linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: linux-kbuild@vger.kernel.org
Cc: "Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Matthias Kaehlcke" <mka@chromium.org>,
	"Behan Webster" <behanw@converseincode.com>,
	"Michal Marek" <mmarek@suse.com>,
	"Vinícius Tinti" <viniciustinti@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 8/9] kbuild: rpm-pkg: keep spec file until make mrproper
Date: Sat, 30 Sep 2017 10:10:10 +0900	[thread overview]
Message-ID: <1506733811-24636-8-git-send-email-yamada.masahiro@socionext.com> (raw)
In-Reply-To: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com>

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>
---

 .gitignore               | 5 +++++
 scripts/package/Makefile | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0c39aa2..4f034b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,11 @@ Module.symvers
 /Module.markers
 
 #
+# RPM spec file (make rpm-pkg)
+#
+/*.spec
+
+#
 # Debian directory (make deb-pkg)
 #
 /debian/
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index b559671..70eea1e 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
 # ---------------------------------------------------------------------------
-- 
2.7.4


  parent reply	other threads:[~2017-09-30  1:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-30  1:10 [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada
2017-09-30  1:10 ` [PATCH 2/9] kbuild: rpm-pkg: install vmlinux.bz2 unconditionally Masahiro Yamada
2017-09-30  1:10 ` [PATCH 3/9] kbuild: rpm-pkg: clean up mkspec Masahiro Yamada
2017-09-30  1:10 ` [PATCH 4/9] kbuild: rpm-pkg: refactor mkspec with here doc Masahiro Yamada
2017-09-30  1:10 ` [PATCH 5/9] kbuild: rpm-pkg: fix build error when CONFIG_MODULES is disabled Masahiro Yamada
2017-09-30  1:10 ` [PATCH 6/9] kbuild: rpm-pkg: replace $RPM_BUILD_ROOT with %{buildroot} Masahiro Yamada
2017-09-30  1:10 ` [PATCH 7/9] kbuild: rpm-pkg: fix jobserver unavailable warning Masahiro Yamada
2017-09-30  1:10 ` Masahiro Yamada [this message]
2017-09-30  1:10 ` [PATCH 9/9] kbuild: rpm-pkg: do not force -jN in submake Masahiro Yamada
2017-10-09 16:43 ` [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506733811-24636-8-git-send-email-yamada.masahiro@socionext.com \
    --to=yamada.masahiro@socionext.com \
    --cc=behanw@converseincode.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=mmarek@suse.com \
    --cc=viniciustinti@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).