All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: replace $(dot-target).tmp in filechk with $(tmp-target)
@ 2023-01-09 13:40 Masahiro Yamada
  2023-01-09 15:27 ` Nicolas Schier
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2023-01-09 13:40 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Masahiro Yamada, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier

$(tmp-target) is a better fit for local use like this.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/Kbuild.include | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 4648ab8f11d4..7778cc97a4e0 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -99,11 +99,11 @@ define filechk
 	$(check-FORCE)
 	$(Q)set -e;						\
 	mkdir -p $(dir $@);					\
-	trap "rm -f $(dot-target).tmp" EXIT;			\
-	{ $(filechk_$(1)); } > $(dot-target).tmp;		\
-	if [ ! -r $@ ] || ! cmp -s $@ $(dot-target).tmp; then	\
+	trap "rm -f $(tmp-target)" EXIT;			\
+	{ $(filechk_$(1)); } > $(tmp-target);			\
+	if [ ! -r $@ ] || ! cmp -s $@ $(tmp-target); then	\
 		$(kecho) '  UPD     $@';			\
-		mv -f $(dot-target).tmp $@;			\
+		mv -f $(tmp-target) $@;				\
 	fi
 endef
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kbuild: replace $(dot-target).tmp in filechk with $(tmp-target)
  2023-01-09 13:40 [PATCH] kbuild: replace $(dot-target).tmp in filechk with $(tmp-target) Masahiro Yamada
@ 2023-01-09 15:27 ` Nicolas Schier
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Schier @ 2023-01-09 15:27 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kbuild, linux-kernel, Nathan Chancellor, Nick Desaulniers

[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]

On Mon, Jan 09, 2023 at 10:40:40PM +0900 Masahiro Yamada wrote:
> $(tmp-target) is a better fit for local use like this.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  scripts/Kbuild.include | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
> index 4648ab8f11d4..7778cc97a4e0 100644
> --- a/scripts/Kbuild.include
> +++ b/scripts/Kbuild.include
> @@ -99,11 +99,11 @@ define filechk
>  	$(check-FORCE)
>  	$(Q)set -e;						\
>  	mkdir -p $(dir $@);					\
> -	trap "rm -f $(dot-target).tmp" EXIT;			\
> -	{ $(filechk_$(1)); } > $(dot-target).tmp;		\
> -	if [ ! -r $@ ] || ! cmp -s $@ $(dot-target).tmp; then	\
> +	trap "rm -f $(tmp-target)" EXIT;			\
> +	{ $(filechk_$(1)); } > $(tmp-target);			\
> +	if [ ! -r $@ ] || ! cmp -s $@ $(tmp-target); then	\
>  		$(kecho) '  UPD     $@';			\
> -		mv -f $(dot-target).tmp $@;			\
> +		mv -f $(tmp-target) $@;				\
>  	fi
>  endef
>  
> -- 
> 2.34.1

I do fully agree.

Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-09 15:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09 13:40 [PATCH] kbuild: replace $(dot-target).tmp in filechk with $(tmp-target) Masahiro Yamada
2023-01-09 15:27 ` Nicolas Schier

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.