All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: masahiroy@kernel.org
Cc: linux-kernel@vger.kernel.org, Andi Kleen <andi@firstfloor.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Nick Desaulniers <ndesaulniers@google.com>,
	linux-kbuild@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
	Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH] kbuild, link-vmlinux: Don't delete output files with make -i
Date: Thu, 23 Jun 2022 10:31:05 +0200	[thread overview]
Message-ID: <20220623083105.26354-1-jslaby@suse.cz> (raw)

From: Andi Kleen <andi@firstfloor.org>

make -i is useful to see output files which normally get deleted on an
error.  Make this work with link-vmlinux.sh too. Don't delete the output
files on error when make -i is used.

Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 scripts/link-vmlinux.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index eecc1863e556..d21759aad4f3 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -193,6 +193,11 @@ sorttable()
 # Delete output files in case of error
 cleanup()
 {
+	# don't delete for make -i
+	case "$MFLAGS" in
+	*-i*) return ;;
+	esac
+
 	rm -f .btf.*
 	rm -f System.map
 	rm -f vmlinux
-- 
2.36.1


             reply	other threads:[~2022-06-23  8:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23  8:31 Jiri Slaby [this message]
2022-06-23  9:45 ` [PATCH] kbuild, link-vmlinux: Don't delete output files with make -i Masahiro Yamada
2022-06-23  9:50   ` Jiri Slaby
  -- strict thread matches above, loose matches on Subject: below --
2021-04-25 21:35 Andi Kleen
2021-04-26  9:01 ` Masahiro Yamada
2021-04-26 14:20   ` Andi Kleen

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=20220623083105.26354-1-jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=ndesaulniers@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.