From patchwork Wed Jul 21 23:23:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12392501 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4240EC6377A for ; Wed, 21 Jul 2021 23:23:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 27BF161241 for ; Wed, 21 Jul 2021 23:23:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231173AbhGUWmj (ORCPT ); Wed, 21 Jul 2021 18:42:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230091AbhGUWmi (ORCPT ); Wed, 21 Jul 2021 18:42:38 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66F94C061757 for ; Wed, 21 Jul 2021 16:23:13 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 14-20020a05600c028eb0290228f19cb433so484787wmk.0 for ; Wed, 21 Jul 2021 16:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SYYNQVaJf+Dyb4ed+bE+B9leJBA3aKE2k3ni+pJiUmw=; b=pJiLEQWAL1Ac1x6Ux3nsAO9IYooBn+echjTuWApSwbGxkMcNFXY33CcBYMTOVBX3tk CaSt3A7PYImYN+t0cXmJH9h7ePfCleVFZjqOPQaYpm0gk00eL+6e40coKrg1p+L/SzAt KgcyliiE48m0A9U0Dtm2D0cPu078n2Rl/tENxvPevx4iuQ4L0aIlEGIospVxcIqX5hGc yU++TrsPd2c0n+PH7kxTYILhmpQsY9kQ668SJpBt/y+dkFphSfhp/OPMBWGKpVLQEhdt 0MpxfdGLMfvWlNug3fQo13B7QU56v19SrFXx4BOpK4ahaAbnOxxPQEz6AYLe8vReVdpa GLtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SYYNQVaJf+Dyb4ed+bE+B9leJBA3aKE2k3ni+pJiUmw=; b=bSBx4vm+g8XqSUvpbu25jVTGgbJV4JV2y0p28Xq7QaTRXE/nTbiqb41tWLZHNH2P/F cCajg60u/3OrHa+Txbz1Y/fZUU1rsHMkoHBF99xDk4WEy/WygK+ERhm/Adi/zE+NG2GB NxpetzV1i5F6tpUuRcUbtriM5y2GuX0IEpPyWrB5ALi0htE9zFrbL5VvamC4gjxmWy6O nUx0W7Gr1Zewf76ayU/lK9y5ixOXrfGP4t5tY27BudZ/mXSXO5cxkowkMvqvGnM2Mkbr DPzyJ8mrh3TjLEuwACImOJ5eD6HemFvdEHBTZ+ZpTt+9iryR/nr0ZCuNXg6s0BmAqQxo gUbw== X-Gm-Message-State: AOAM533B6jq6f7PJiaaFD40rTWvwFIfkavuXUizFsi3bGKFO1hHFjLjr Ma8dq+8hGVVcqW3k1qAzoTZThgMZZOLZXA== X-Google-Smtp-Source: ABdhPJxVdKbNj0hNZIQgGGC0vLSws0YY3SEBTSiR5tj/KScWlORNeNFp4UzSDEG3by0e9M9Exwh2Hg== X-Received: by 2002:a05:600c:4f56:: with SMTP id m22mr4564385wmq.103.1626909791704; Wed, 21 Jul 2021 16:23:11 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id v11sm27690260wrs.4.2021.07.21.16.23.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 16:23:11 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Denton Liu , Felipe Contreras , Kristof Provost , Taylor Blau , Jeff King , Ramsay Jones , =?utf-8?b?w4Z2YXIgQXJuZmrDtnI=?= =?utf-8?b?w7AgQmphcm1hc29u?= Subject: [PATCH v3 1/5] Makefile: move ".PHONY: cscope" near its target Date: Thu, 22 Jul 2021 01:23:02 +0200 Message-Id: X-Mailer: git-send-email 2.32.0.955.ge7c5360f7e7 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Move the ".PHONY: cscope" rule to live alongside the "cscope" target itself, not to be all the way near the bottom where we define the "FORCE" rule. That line was last modified in 2f76919517e (MinGW: avoid collisions between "tags" and "TAGS", 2010-09-28). Signed-off-by: Ævar Arnfjörð Bjarmason --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c7c46c017d3..7dd93ef4c3e 100644 --- a/Makefile +++ b/Makefile @@ -2749,6 +2749,7 @@ tags: FORCE $(FIND_SOURCE_FILES) | xargs ctags -a -o tags+ && \ mv tags+ tags +.PHONY: cscope cscope: $(RM) cscope* $(FIND_SOURCE_FILES) | xargs cscope -b @@ -3260,7 +3261,7 @@ endif .PHONY: all install profile-clean cocciclean clean strip .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell -.PHONY: FORCE cscope +.PHONY: FORCE ### Check documentation # From patchwork Wed Jul 21 23:23:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12392503 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00DECC6377B for ; Wed, 21 Jul 2021 23:23:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE3586108B for ; Wed, 21 Jul 2021 23:23:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231177AbhGUWml (ORCPT ); Wed, 21 Jul 2021 18:42:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231164AbhGUWmj (ORCPT ); Wed, 21 Jul 2021 18:42:39 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42B89C061575 for ; Wed, 21 Jul 2021 16:23:14 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id a23-20020a05600c2257b0290236ec98bebaso1882851wmm.1 for ; Wed, 21 Jul 2021 16:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BD5ep6McKnqZh4kQK3eRMCFgv51sbPR9ow5DGY9a9KU=; b=aK1qliKpxAClGcSbVcdsJmoDexcq45Zg+JMpL4iuvvZaN/5qWuFbxb9uzxmpzeBan/ v1GJPCDG8/wh24gt3xo3ITbQFI9wGqZ+tl9LyRe3BdRAOxRcZ7U/GisBp1n6IiXiOk8Y o4Nu9JfnB4keNlDvjg3ZqGp5KwO6XxKRPlNJZJaqeTsApoe1mtJQN9k3dejtp5FKxUuz DkBCjJGVJUWJs0X2OTWdVX5ER+v7LQimZc03j6byvaCQ1jn+Wub7s4q+CXd9VJn3g+9h f0tfP081OSfYWZW7uI1UpSWfXzs8zkT/F6IrXZrgz5GCWbOGDN9gPx4ZLt/rxL9hkf0T XklQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BD5ep6McKnqZh4kQK3eRMCFgv51sbPR9ow5DGY9a9KU=; b=WdXD+/busx5+wyKURaq0i0qJ33j6COK1ph1ygH+fUzLQG6r/J6psJMZ/1XKCrkSNZR /9RLbawYUuvRwT85Nn5PTwZPIMrjV6tx257L1OfdqE6eF0G2lz9FdtR9VF3RpGDcWJb/ uJ2MZ7jn2SsID1Ii7R3XR+ZDk7+Juk4ZnKXosXsRLIE9rwUZCqGsBmOvIpfv1DB1ztRB GbSlsstLxzbrbU8ILTVl5cTdqV0Nk0ocdi3iTVYi/Ep1ohWl+fsa8fHYWwR0BiBSOxb8 v9hixIgjQR6wmpkI+rCgZbpLLaKOMCps1vk3jakjKst7DvCVstOGSJEJ+a8y44H7x+bQ xNbQ== X-Gm-Message-State: AOAM532SpwnMBNHMYxdq6mw5e1nryD9BXz4QaJT74GX3sUjlLgE3vIhm rwg04bHfcMVvsdwK/098ZqKwCkg/kDGiOw== X-Google-Smtp-Source: ABdhPJxkKkYzxdNryTWDz+bY3a3p6NYDZzhevlKqHUGYm5Obyrt96AacGh2t3uccZ1DeweXS5BMzhw== X-Received: by 2002:a1c:a7d2:: with SMTP id q201mr6357642wme.61.1626909792662; Wed, 21 Jul 2021 16:23:12 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id v11sm27690260wrs.4.2021.07.21.16.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 16:23:12 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Denton Liu , Felipe Contreras , Kristof Provost , Taylor Blau , Jeff King , Ramsay Jones , =?utf-8?b?w4Z2YXIgQXJuZmrDtnI=?= =?utf-8?b?w7AgQmphcm1hc29u?= Subject: [PATCH v3 2/5] Makefile: add QUIET_GEN to "cscope" target Date: Thu, 22 Jul 2021 01:23:03 +0200 Message-Id: X-Mailer: git-send-email 2.32.0.955.ge7c5360f7e7 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Don't show the very verbose $(FIND_SOURCE_FILES) command on every "make cscope" invocation. See my recent 3c80fcb591 (Makefile: add QUIET_GEN to "tags" and "TAGS" targets, 2021-03-28) for the same fix for the other adjacent targets. Signed-off-by: Ævar Arnfjörð Bjarmason --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7dd93ef4c3e..69410095949 100644 --- a/Makefile +++ b/Makefile @@ -2751,7 +2751,7 @@ tags: FORCE .PHONY: cscope cscope: - $(RM) cscope* + $(QUIET_GEN)$(RM) cscope* && \ $(FIND_SOURCE_FILES) | xargs cscope -b ### Detect prefix changes From patchwork Wed Jul 21 23:23:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12392505 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D2F0C6377C for ; Wed, 21 Jul 2021 23:23:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4DCBC6121E for ; Wed, 21 Jul 2021 23:23:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231178AbhGUWmm (ORCPT ); Wed, 21 Jul 2021 18:42:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231166AbhGUWmj (ORCPT ); Wed, 21 Jul 2021 18:42:39 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38844C0613C1 for ; Wed, 21 Jul 2021 16:23:15 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id u8-20020a7bcb080000b02901e44e9caa2aso1875139wmj.4 for ; Wed, 21 Jul 2021 16:23:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8xEXRrfodZNQGLYknSjPsw7pg16wJ036yuEIBjtz0cs=; b=C4OMb8eos6vav6BI034MrvwNBRINCO+xn2rxI3clcVpyvB1gyRMuZrWgWBZ6OgMTgj hVfRjFKlxk3SHdLOM7/USqq8dNtaGWfy91xpA6JHC+eDpZgbS4uzxRyV0uMk/GGWWCDg Pz8Dd5YcpVEF51Wv9LhCIbkaEO5Qg6EkcZQ4YJwdsdHy5gZwT8EWKeT3bb91RpZn2QVR /POu68sbZwStjxOjeANEwsqLa/sHvzZHoZn+Cy9pQvQmckx7XbKvvvvqgb3egXmE6oQu hL2bPKl7OP3qgCRFEuVj6Ubl7Ywj46NS814pqhKhFO6LnssL3ZgQRUgOOuBNXpZfZDqo 2BhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8xEXRrfodZNQGLYknSjPsw7pg16wJ036yuEIBjtz0cs=; b=be7ErLbzGdC9eVp+cG6nteVLEJ9bk4sMYXhEXHUtiM7NifZZyNRQPCySD+MUl583L+ NFBNEkGIeFl/lB79gVH4bWwLgn4HdNXT6F7Po2ZUPwqVqMWymeSuNlKP0aTVk4VnSwVU 0JWLAQdNmS500DXxAQ5ESaNF7iPwtDQaCa7nt9aA79ircLKkF8go/rqE7j2gA7pVnm4N x8SY66q2sEkHCA+jyYxi8Le/vhioPPbKFQg8H1Hjny5yJ1TS9negI8rnCD3LL1d6ovjg heMUX3bT9myzeKj/Tv5MUQSjSsARnzRjrPpXhyIlJ6mnDSbdeC759l4Xeij7Y94O720n EJug== X-Gm-Message-State: AOAM533WXpAq3VU8UsUa59h+ZS+PF36Sq3SufG9HemweivWgoI4WK+DL NDBvJ3LJH+CuzXPyejXt8JUXPxcxBmd+uA== X-Google-Smtp-Source: ABdhPJxvH/pGUXknDCbMHycvqquAjPrvV2/Wa7xUsbQ+fvjE+ZFWMJsay88cRGgo78+tQJwP33Tp2Q== X-Received: by 2002:a05:600c:221a:: with SMTP id z26mr6393087wml.34.1626909793646; Wed, 21 Jul 2021 16:23:13 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id v11sm27690260wrs.4.2021.07.21.16.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 16:23:13 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Denton Liu , Felipe Contreras , Kristof Provost , Taylor Blau , Jeff King , Ramsay Jones , =?utf-8?b?w4Z2YXIgQXJuZmrDtnI=?= =?utf-8?b?w7AgQmphcm1hc29u?= Subject: [PATCH v3 3/5] Makefile: don't use "FORCE" for tags targets Date: Thu, 22 Jul 2021 01:23:04 +0200 Message-Id: X-Mailer: git-send-email 2.32.0.955.ge7c5360f7e7 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Remove the "FORCE" dependency from the "tags", "TAGS" and "cscope" targets, instead make them depend on whether or not the relevant source files have changed. For the cscope target we need to change it to depend on the actual generated file while we generate while we're at it, as the next commit will discuss we always generate a cscope.out file. Signed-off-by: Ævar Arnfjörð Bjarmason --- Makefile | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 69410095949..18895d94ffa 100644 --- a/Makefile +++ b/Makefile @@ -2739,20 +2739,24 @@ FIND_SOURCE_FILES = ( \ | sed -e 's|^\./||' \ ) -$(ETAGS_TARGET): FORCE +FOUND_SOURCE_FILES = $(shell $(FIND_SOURCE_FILES)) + +$(ETAGS_TARGET): $(FOUND_SOURCE_FILES) $(QUIET_GEN)$(RM) "$(ETAGS_TARGET)+" && \ - $(FIND_SOURCE_FILES) | xargs etags -a -o "$(ETAGS_TARGET)+" && \ + echo $(FOUND_SOURCE_FILES) | xargs etags -a -o "$(ETAGS_TARGET)+" && \ mv "$(ETAGS_TARGET)+" "$(ETAGS_TARGET)" -tags: FORCE +tags: $(FOUND_SOURCE_FILES) $(QUIET_GEN)$(RM) tags+ && \ - $(FIND_SOURCE_FILES) | xargs ctags -a -o tags+ && \ + echo $(FOUND_SOURCE_FILES) | xargs ctags -a -o tags+ && \ mv tags+ tags -.PHONY: cscope -cscope: +cscope.out: $(FOUND_SOURCE_FILES) $(QUIET_GEN)$(RM) cscope* && \ - $(FIND_SOURCE_FILES) | xargs cscope -b + echo $(FOUND_SOURCE_FILES) | xargs cscope -b + +.PHONY: cscope +cscope: cscope.out ### Detect prefix changes TRACK_PREFIX = $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ):\ @@ -2936,7 +2940,7 @@ check: config-list.h command-list.h exit 1; \ fi -FOUND_C_SOURCES = $(filter %.c,$(shell $(FIND_SOURCE_FILES))) +FOUND_C_SOURCES = $(filter %.c,$(FOUND_SOURCE_FILES)) COCCI_SOURCES = $(filter-out $(THIRD_PARTY_SOURCES),$(FOUND_C_SOURCES)) %.cocci.patch: %.cocci $(COCCI_SOURCES) From patchwork Wed Jul 21 23:23:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12392507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13385C6377A for ; Wed, 21 Jul 2021 23:23:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E67EB6108B for ; Wed, 21 Jul 2021 23:23:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231187AbhGUWmo (ORCPT ); Wed, 21 Jul 2021 18:42:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231174AbhGUWmk (ORCPT ); Wed, 21 Jul 2021 18:42:40 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2177BC061575 for ; Wed, 21 Jul 2021 16:23:16 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id t5so3852489wrw.12 for ; Wed, 21 Jul 2021 16:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZMg6bFmwh0KpGfP8NshiU4zHAM8oV0709HaA31wq56E=; b=V+HOC+ChiDlb/r2rn89TUkW/PlHYiY32IUF5mCqLW1USNYxwx+ekboYFgOFL6l/NeN wTDJMCqIJUmGdc3YkMud32CJKd7aq9BYJKFlZOmf5UXZFYKt/pth8SDqoVjqWdHo90L7 aQORP0GnL9/XzupgCQPP0BC8EHSWXs4fw1uKIOiBKD8bRgdRBQy5k/+y3BA052Fq8ixG O6cwKPworeIx/DajMNdVWr9lb4Jk61w6XOkGM6FWXUB0g+kvvIW2W84nvMjOso16IyLt rTnNpowahoaFOxoSEwpfo53B/bWKX42Yfhczf3Ezp8Mxaoc/ICFMOXNU90fQTOnWPCnl viDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZMg6bFmwh0KpGfP8NshiU4zHAM8oV0709HaA31wq56E=; b=poD7hos+gUIOj5hHKpg6PzlX1ibvrUeLPOiti9iBZvMG47Fz2hXrj2+9/8wMDxm/35 5CN+e7KvVgUp3hjeilr39tyWx+ckJSHvqTr8lMFr2x5OYMTp9nqN4SW7uuLMjvA0bBZT wm+X3ycYerw0mUr9UVik6WHtbrDQ40p3bXQmWCUP8Kg9rQItgmQPhhL20tY8FvjQsZxA rHFExb/7j9N7agluUAUsosvPw5ecI+W+YpXjDTbd/Yai2gxLoe9+CX9yyp5c/OYVW1jD 2kQZj5tXsRjLe3HoYEDpaIDi55HJtMTIWZlSVaOfSMzoDoTVNQGD65A/8XmKjwWFriWv pLBw== X-Gm-Message-State: AOAM533xzKqWX+Muo+TRJL6dKJJGAb6NS1Sxv2hGZxp0oySEh5djOD4G ZYOUThqL9h0VXTiVyXC8bspa57YaIPKlaw== X-Google-Smtp-Source: ABdhPJwfqj+YuuJ/CTm0lFpOVEVDlRTARgWbta3VxosRa+MDkCFtLsGWrohhrWblP2yaKXLN/+HgZQ== X-Received: by 2002:a5d:5606:: with SMTP id l6mr44861112wrv.190.1626909794533; Wed, 21 Jul 2021 16:23:14 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id v11sm27690260wrs.4.2021.07.21.16.23.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 16:23:14 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Denton Liu , Felipe Contreras , Kristof Provost , Taylor Blau , Jeff King , Ramsay Jones , =?utf-8?b?w4Z2YXIgQXJuZmrDtnI=?= =?utf-8?b?w7AgQmphcm1hc29u?= Subject: [PATCH v3 4/5] Makefile: the "cscope" target always creates a "cscope.out" Date: Thu, 22 Jul 2021 01:23:05 +0200 Message-Id: X-Mailer: git-send-email 2.32.0.955.ge7c5360f7e7 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In the preceding commit the "cscope" target was changed to be a phony alias for the "cscope.out" target. The cscope target was added in a2a9150bf06 (makefile: Add a cscope target, 2007-10-06), and has always referred to cscope* instead of to cscope.out. As far as I can tell this ambiguity was never needed. The "-fcscope.out" (note, no whitespace) argument is enabled by default, but let's provide it explicitly for good measure. Signed-off-by: Ævar Arnfjörð Bjarmason --- .gitignore | 2 +- Makefile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 311841f9bed..d74029c1ca7 100644 --- a/.gitignore +++ b/.gitignore @@ -217,7 +217,7 @@ /.vscode/ /tags /TAGS -/cscope* +/cscope.out /compile_commands.json *.hcc *.obj diff --git a/Makefile b/Makefile index 18895d94ffa..730ff23b923 100644 --- a/Makefile +++ b/Makefile @@ -2752,8 +2752,8 @@ tags: $(FOUND_SOURCE_FILES) mv tags+ tags cscope.out: $(FOUND_SOURCE_FILES) - $(QUIET_GEN)$(RM) cscope* && \ - echo $(FOUND_SOURCE_FILES) | xargs cscope -b + $(QUIET_GEN)$(RM) cscope.out && \ + echo $(FOUND_SOURCE_FILES) | xargs cscope -f$@ -b .PHONY: cscope cscope: cscope.out @@ -3230,7 +3230,7 @@ clean: profile-clean coverage-clean cocciclean $(RM) $(HCC) $(RM) -r bin-wrappers $(dep_dirs) $(compdb_dir) compile_commands.json $(RM) -r po/build/ - $(RM) *.pyc *.pyo */*.pyc */*.pyo $(GENERATED_H) $(ETAGS_TARGET) tags cscope* + $(RM) *.pyc *.pyo */*.pyc */*.pyo $(GENERATED_H) $(ETAGS_TARGET) tags cscope.out $(RM) -r .dist-tmp-dir .doc-tmp-dir $(RM) $(GIT_TARNAME).tar.gz $(RM) $(htmldocs).tar.gz $(manpages).tar.gz From patchwork Wed Jul 21 23:23:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 12392509 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6019C6377B for ; Wed, 21 Jul 2021 23:23:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A151B61249 for ; Wed, 21 Jul 2021 23:23:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231193AbhGUWmo (ORCPT ); Wed, 21 Jul 2021 18:42:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231179AbhGUWmm (ORCPT ); Wed, 21 Jul 2021 18:42:42 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BC5CC061757 for ; Wed, 21 Jul 2021 16:23:17 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id d12so3831112wre.13 for ; Wed, 21 Jul 2021 16:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zyJK/Ak+cPx4/DM9mhewAqJMfKfZUJQOzuzofgyXbkI=; b=DbklSK4yFcPI0L0+2H8v+y7kJorbWGPDt5Y9AMdOp8AWQPlswv8x4EdKsgiYdM6/7L SOvfGpBM/M43Mk5nnPJZRa8V12PJCunD5vjjDKN/pJ2GypktX98b0DLRm5IwqekgzAdz 4R3wvbQhB1XpKZBEUnpsOGIEwZldvYZv7CnbKW6Dws3vf0sbPEeZTYtbi1+9J3oVxIpx hni381SC9br6GR7U7kCAxntCI7RmhAIILo7bIVKO38myDE4j4W9QC+MWRXztiQZraAtF k5B/Sr4Q/lhQeg2m62UAYAtQ9ACjcYdbkRzA0RnmwFIK/2YqT0UtgKC7h3I9vLp4Hjar KLgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zyJK/Ak+cPx4/DM9mhewAqJMfKfZUJQOzuzofgyXbkI=; b=FAdhAyqK6DM6TnkZGTb9wtTtJ7fxRXZ4RYo0exCDrHH8uPDnNEZvpBsAzI4Ml7N7j5 kYtNCN4/Gp8+JIcUdYBgY/c8HlMr7LgLVk2ilsHwBqv5kuQBaYyl11BE3WlNEa+KC7us wVD/l83cp9UVhOTsGCuwdWtiWEk1Dyk9r3ggKZl1Mpak3ZnG4tz/C2QntVMeGcdeeO/n 1A2GDDnHDb+eVoUmQZmo7cjb6YLIsbEjgsRPWep4QW+PSNZcsR69a6gbmS7iWmQi2f4G kzVCZi4P39M8UfizlbH++6ESpNXejCOwX7mr53CEvIbkKTnqOTypp/JrP0XGblKA/Y5S nZXw== X-Gm-Message-State: AOAM531nmFHyhI/xAmmjMnqa2bD2bSn9RR5SfQSDQ7A2Jl9PJNRfyFdf 7GRccrpzgCbpMoPQJViyggOABASJZxA+QQ== X-Google-Smtp-Source: ABdhPJwhalCZNHBjGcgLmMTm9sglc9Nglk5fB3yYl59nUazNlGbX0Q97NslXaUs7J9vA2RkcH/ffhQ== X-Received: by 2002:a5d:67d0:: with SMTP id n16mr20626483wrw.266.1626909795631; Wed, 21 Jul 2021 16:23:15 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id v11sm27690260wrs.4.2021.07.21.16.23.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 16:23:14 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , Denton Liu , Felipe Contreras , Kristof Provost , Taylor Blau , Jeff King , Ramsay Jones , =?utf-8?b?w4Z2YXIgQXJuZmrDtnI=?= =?utf-8?b?w7AgQmphcm1hc29u?= Subject: [PATCH v3 5/5] Makefile: normalize clobbering & xargs for tags targets Date: Thu, 22 Jul 2021 01:23:06 +0200 Message-Id: X-Mailer: git-send-email 2.32.0.955.ge7c5360f7e7 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Since the "tags", "TAGS" and "cscope.out" targets rely on piping into xargs with an "echo | xargs" pattern, we need to make sure we're in an append mode. Unlike my recent change to make use of ".DELETE_ON_ERROR" in 7b76d6bf221 (Makefile: add and use the ".DELETE_ON_ERROR" flag, 2021-06-29), we really do need the "rm $@+" at the beginning (note, not "rm $@"). This is because the xargs command may decide to invoke the program multiple times. We need to make sure we've got a union of its results at the end. For "ctags" and "etags" we used the "-a" flag for this, for cscope that behavior is the default. Its "-u" flag disables its equivalent of an implicit "-a" flag. Let's also consistently use the $@ and $@+ names instead of needlessly hardcoding or referring to more verbose names in the "tags" and "TAGS" rules. These targets could perhaps be improved in the future by factoring this "echo | xargs" pattern so that we make intermediate tags files for each source file, and then assemble them into one "tags" file at the end. The etags manual page suggests that doing that (or perhaps just --update) might be counter-productive, in any case, the tag building is fast enough for me, so I'm leaving that for now. Signed-off-by: Ævar Arnfjörð Bjarmason --- Makefile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 730ff23b923..295ac359cea 100644 --- a/Makefile +++ b/Makefile @@ -2742,18 +2742,19 @@ FIND_SOURCE_FILES = ( \ FOUND_SOURCE_FILES = $(shell $(FIND_SOURCE_FILES)) $(ETAGS_TARGET): $(FOUND_SOURCE_FILES) - $(QUIET_GEN)$(RM) "$(ETAGS_TARGET)+" && \ - echo $(FOUND_SOURCE_FILES) | xargs etags -a -o "$(ETAGS_TARGET)+" && \ - mv "$(ETAGS_TARGET)+" "$(ETAGS_TARGET)" + $(QUIET_GEN)$(RM) $@+ && \ + echo $(FOUND_SOURCE_FILES) | xargs etags -a -o $@+ && \ + mv $@+ $@ tags: $(FOUND_SOURCE_FILES) - $(QUIET_GEN)$(RM) tags+ && \ - echo $(FOUND_SOURCE_FILES) | xargs ctags -a -o tags+ && \ - mv tags+ tags + $(QUIET_GEN)$(RM) $@+ && \ + echo $(FOUND_SOURCE_FILES) | xargs ctags -a -o $@+ && \ + mv $@+ $@ cscope.out: $(FOUND_SOURCE_FILES) - $(QUIET_GEN)$(RM) cscope.out && \ - echo $(FOUND_SOURCE_FILES) | xargs cscope -f$@ -b + $(QUIET_GEN)$(RM) $@+ && \ + echo $(FOUND_SOURCE_FILES) | xargs cscope -f$@+ -b && \ + mv $@+ $@ .PHONY: cscope cscope: cscope.out