Message ID | 20230109134040.3191458-1-masahiroy@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2163179wrt; Mon, 9 Jan 2023 05:45:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXv6aylvnVdRbhLLo+zJLhNR8tx76p/GZ9iED5PXbYFmfHT6qGE7X9eoA0t55BSV//Im7LwH X-Received: by 2002:a17:902:d54b:b0:193:3594:82e4 with SMTP id z11-20020a170902d54b00b00193359482e4mr2703699plf.18.1673271902576; Mon, 09 Jan 2023 05:45:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673271902; cv=none; d=google.com; s=arc-20160816; b=bken4d4BB4+V+SHvN2JKDB/yoA2k6o1tsvXaHpv7tkiLexGCA3Kyo7oyyijEsjan8c jLQKIZ+63rQw4WrYgCKv9d2KvgRnAxxiH5RwFxR7+5yu1JOAm4i1R+kLhgCs0h4wwSww 7YQfhgpJKswsxRsefy4ZFiOB+JKMV3PZ1M1fcBgiiNflHqn6eyr5mwkK+txzUGcCd7Zw PPiBdc/0qYNT6ozDDHYO5AP2tqQt3+vrKCdsaDDSnobpDBX6AAlkdsloObuqgVK3ENwD O6EIx7lI/P+yHNZkd+oTgxyYjzsbhhU67NcnRlCAB0yxNvOUDmZmmaXPmhQ/z5fszeYW +SuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qrtVxFHxshIUJPWmmya/qxHMZCwscCS5sw2dWZ1dan4=; b=glL7iR3eoB18dgtMK34RxDVSOrNxQNlNW3tuBZ7YugYZhbSb2btAjxjzMs6wHZ+irW vO3F9Wk8AVqZcfJJP8zyKZNNxQsi+bSxLVpJz9Q7/I0YVyzOuGjENYEVHJRetls6srBX mtgj8SsKCP4ZoSs+i79lOMq1p40GuQVnNvRY4c35SdPpzedt7N/DnJxsBn/9WkhDaYrf HgV6wErHp49Gcv5B2NguT0SWWmx+4p45f1ujoW4suPCFHhAO6gNwewPJq5GYWudKkCFj pveN3QtOA4lIT7K5Etg1FQ858UlueJvpaqWYd5UV0txmJysBQ0BzYhHQF9s+zVvfaA5+ Vrbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hVVP+FSO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n12-20020a170903110c00b001870dc9ef5asi9942692plh.285.2023.01.09.05.44.49; Mon, 09 Jan 2023 05:45:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hVVP+FSO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236518AbjAINmG (ORCPT <rfc822;274620705z@gmail.com> + 99 others); Mon, 9 Jan 2023 08:42:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237179AbjAINlU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 9 Jan 2023 08:41:20 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B95111C; Mon, 9 Jan 2023 05:40:48 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 76EC6B80DE2; Mon, 9 Jan 2023 13:40:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1778C433F0; Mon, 9 Jan 2023 13:40:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673271646; bh=9EuVXjz2UbAmjPovKyC95UPc5WfADTmiN/ZzTiBVjz4=; h=From:To:Cc:Subject:Date:From; b=hVVP+FSOg1gJIOT65Dz4kcG/y72uM36JlWYMDZv14sAB5m/u/5rln+pnt2av4ATxG +NlEjDVzOQLcKd3iadCtF0OA1TwktZnEUjYfavepl4KVxc3JKRdRAdFON3sfy3pwrK HFnnCsQM5kyw7KjLNa4QZLMbOhdVvdtjq9KxD+xBO3jHeDbCAk0A4nC4few+hRDDdK jIMcW4bpU41C8oH5SmC0CvaKXeKttQyoPAmMhYrny3DJ8oqDVDT2H7q06ywCTWRlDq rGqtKflb0UKiKUASsUqDuZLAPcFNCN4weg43fHZGZoHspi17Jhw7nG/gswgBbfWtYi j0O+4BvDIVAcA== From: Masahiro Yamada <masahiroy@kernel.org> To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada <masahiroy@kernel.org>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Nicolas Schier <nicolas@fjasle.eu> Subject: [PATCH] kbuild: replace $(dot-target).tmp in filechk with $(tmp-target) Date: Mon, 9 Jan 2023 22:40:40 +0900 Message-Id: <20230109134040.3191458-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754552758462900677?= X-GMAIL-MSGID: =?utf-8?q?1754552758462900677?= |
Series |
kbuild: replace $(dot-target).tmp in filechk with $(tmp-target)
|
|
Commit Message
Masahiro Yamada
Jan. 9, 2023, 1:40 p.m. UTC
$(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(-)
Comments
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>
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