Re: [PATCH] kbuild, link-vmlinux: Don't delete output files with make -i

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 26, 2021 at 6:35 AM Andi Kleen <ak@xxxxxxxxxxxxxxx> wrote:
>
> From: Andi Kleen <andi@xxxxxxxxxxxxxx>
>
> 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.
>
> Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> ---
>  scripts/link-vmlinux.sh | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> index 0e039a4cf2cb..a1a57f214c58 100755
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh
> @@ -300,6 +300,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 .tmp_System.map
>         rm -f .tmp_initcalls.lds
> --
> 2.25.4
>


How about removing on_exit() and on_signals() entirely?

.DELETE_ON_ERROR target removes vmlinux on error anyway.

Leaving intermediate files is safe, I think.



-- 
Best Regards
Masahiro Yamada



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux