From patchwork Wed Aug 4 22:54:36 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: 12419873 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 3FEDAC4320A for ; Wed, 4 Aug 2021 22:54:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1DF07610A8 for ; Wed, 4 Aug 2021 22:54:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235024AbhHDWzA (ORCPT ); Wed, 4 Aug 2021 18:55:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233111AbhHDWy7 (ORCPT ); Wed, 4 Aug 2021 18:54:59 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6A2EC061798 for ; Wed, 4 Aug 2021 15:54:45 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id d8so3967986wrm.4 for ; Wed, 04 Aug 2021 15:54:45 -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=y8XeVhwXbtxEG8JTEL0Qfc1270wRE+86bC+Z7M6/dHE=; b=FbAofwF7RIXU4QR2oiWgsNZepd/RV+/ndfGCDkT05zubLaz8RU8+v/MIXw4fxR4B4J ffjXF6m1KRlAW2ufCq+kYxEKkBThwgHZ5+6t0MmRMmJ4xu2n4H3/Lg55I1kWpyJRJ4GX xXgyqK/3/QlMbNE+bLSqLoB4vcQB+B0e23E6AQEJNRJq6vVnhGbw5G0LDIvmNa/nw2Qg z5+zg0XynXCLBukd4lDZS3RwnbFjmT+1kMXk8/YSldKzyFCpJf8m8vPdv8ITbukaFXBg wHqQUTEqOHBzqJDiHPks/uoYvUNXUjgz6jsiyldyFsmPDu92XSAggqsAt4aIUo4rPNs7 Sm3w== 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=y8XeVhwXbtxEG8JTEL0Qfc1270wRE+86bC+Z7M6/dHE=; b=oyC1E7+WtK2yMJDqwJL81xWwSYfDgIXz558SRkYDNv4/7/pCxhmcB7kqKS5972Uw06 Y/47AOccK/xlVsCKwlMgH0tcJI572/g00fdvoW+ZQULEz/2kuOFBfD4aS2H91MkKAltp xZXQPFL367PRk2cZGMYloh5LLCush9CDdR/MMZjX6IWh/VQO1G2iaew4L63GHB8Utskv 9pvuEuzo1Yh2ASPmeNSm1hLpT7qqu3H7tJCxcqyHX90d8k3oZXePEqxI+gHn9QOEzqBi gUqT4HmPwMBR1YVGDSOZLgkgm7MXrgfzI8wwEQCaRRtIvizsG9supKvU42lythNSOgqR fAEQ== X-Gm-Message-State: AOAM5309Mts5hhakHqGQlWA0rkXNsBNstTaA6K2i9j4PLOMWh3d/Z3cX 5wWpbQXMFdBFltWZRFYBWP+YJMTQBEI= X-Google-Smtp-Source: ABdhPJwpw29r8+mbjjQltSRqvIh41FuZqlw+AeMNOMil+7PyzvrCwWc/ApZy48uVnV9k4452kmWt2Q== X-Received: by 2002:adf:eccc:: with SMTP id s12mr1530587wro.331.1628117684068; Wed, 04 Aug 2021 15:54:44 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id u11sm3968190wrt.89.2021.08.04.15.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 15:54:43 -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 v4 1/5] Makefile: move ".PHONY: cscope" near its target Date: Thu, 5 Aug 2021 00:54:36 +0200 Message-Id: X-Mailer: git-send-email 2.33.0.rc0.597.gc569a812f0a 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 9573190f1d7..671dde5c7a1 100644 --- a/Makefile +++ b/Makefile @@ -2756,6 +2756,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 @@ -3267,7 +3268,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 Aug 4 22:54:37 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: 12419875 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 80598C432BE for ; Wed, 4 Aug 2021 22:54:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6569F6109F for ; Wed, 4 Aug 2021 22:54:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235307AbhHDWzC (ORCPT ); Wed, 4 Aug 2021 18:55:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234938AbhHDWzA (ORCPT ); Wed, 4 Aug 2021 18:55:00 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7529EC061799 for ; Wed, 4 Aug 2021 15:54:46 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id n12so3974036wrr.2 for ; Wed, 04 Aug 2021 15:54:46 -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=Gb05njfbNxLjpFx1D3j/nkPQkBgXLWRHHC5yoWoC4Eo=; b=P/31iPbk5njnxVUcuJrM9EMK607Rnk6uIim9DC6XUzp2953tUBiI4h2wjCjznl6+6l qFIzmP10pTR8mp+Sm2tYkrQ+JJ9DmP3BWHaHOShA5zdGLIlXK4Sa+hcBscaTeSA6kSyf cciE4MNH8IshKib9UkyEZgRdHIqog+WlQJuRI6klCV4Yr2zTHrYBDOMxLW8ttiSxtZxT mXHH1LQK6GzKX0BPQETHnHHS475Rj0wItUPsPy5IgcphhYxNHR6wdU4E9l4R9wvxsARe bvwW+VOxLBQqhIEATqGUpt2b33haK0QI9K5R2ewXG8vAXunIqtXMf4rbMpQ9QDZ5ZHUr ZbCA== 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=Gb05njfbNxLjpFx1D3j/nkPQkBgXLWRHHC5yoWoC4Eo=; b=fW10J0zVpRz3m6P1f342Zf6u249lWJCYD+imZq8B2rg+ddbqVX9N8vtBTZt0SO1wE7 jx29hd6FGa6vA0B/TIhzsmeqm8H1lR1b4KtNfIzSw7bWk9ikgi0kO7C5YCfh6ujgspho YarxXQSaId/ythS4ViCJ94WRPpLqoyHaurICsMgRKT2f7GHCUZ+V0AhG/aLNg+55QErG vSkyj0tBTibNcVTB1Owo3L5npjRUoe2oNLqFbRA3/X6xNer8eCTorphf21+DQPsGW/f/ PUaG2Q7SGrcA8GpgHBz6K4qL/RQTt7TmwxM2uKaSrbb+ZKStsfgtb2z3miLtLWsj+vdc n8Hg== X-Gm-Message-State: AOAM530VZuZ42eijC6rJ/TEzJNHFqpbnyLhpDfliewr7iWwYDDZUwud+ PCOW+7Yk+Hyu0SRt1aVdiRdo3HFM6Usq4g== X-Google-Smtp-Source: ABdhPJwJrDgUAf3SP4hpxmu7YTdHNwsu20bLPlJY2JlacOWSbOF2ZJYKVI+/7ivL+MdM5RhHbwgwtQ== X-Received: by 2002:adf:f710:: with SMTP id r16mr1630109wrp.124.1628117684908; Wed, 04 Aug 2021 15:54:44 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id u11sm3968190wrt.89.2021.08.04.15.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 15:54:44 -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 v4 2/5] Makefile: add QUIET_GEN to "cscope" target Date: Thu, 5 Aug 2021 00:54:37 +0200 Message-Id: X-Mailer: git-send-email 2.33.0.rc0.597.gc569a812f0a 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 671dde5c7a1..59c2e98795b 100644 --- a/Makefile +++ b/Makefile @@ -2758,7 +2758,7 @@ tags: FORCE .PHONY: cscope cscope: - $(RM) cscope* + $(QUIET_GEN)$(RM) cscope* && \ $(FIND_SOURCE_FILES) | xargs cscope -b ### Detect prefix changes From patchwork Wed Aug 4 22:54:38 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: 12419877 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 32705C4320A for ; Wed, 4 Aug 2021 22:54:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1701060C41 for ; Wed, 4 Aug 2021 22:54:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235472AbhHDWzD (ORCPT ); Wed, 4 Aug 2021 18:55:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235050AbhHDWzB (ORCPT ); Wed, 4 Aug 2021 18:55:01 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51B57C0613D5 for ; Wed, 4 Aug 2021 15:54:47 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id l18so3962692wrv.5 for ; Wed, 04 Aug 2021 15:54:47 -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=Ths9J2yVNYJW6di0dSwgHFL7o8LtpPYnkPUSZoZ9dFg=; b=izqGoZZT+HtaYwGQk/OcQPgVDqBVd0XIr8FdduGmq6O7CKTIgtTxKev5TyO/QMzFjU AyATJto9ZE3I+JmpHQhggqaC99Np3EiNnxFBcyI+9XtWAoF+V17Y1ZQHxnQrdomF6Imm l6WwZEsuZ1YTAgEEz8z42dFnd5aWefk/YuWWBqYrZN6pUSfeCOUqzPJ3wd/g4GHmNrW4 Uz6PO8K0EUGl+798HXtxdrBQBTEXwZAl3bR1kM3UNfMUxM7jlPY1b/+Nw5lXAXa27Mnu YvYBx2O2g/8JRHR31vlF0JFr7zbHgvGPCSI0t5QHNk5BKwkY1o6HFPmG1xqakWhmfSSX sTSg== 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=Ths9J2yVNYJW6di0dSwgHFL7o8LtpPYnkPUSZoZ9dFg=; b=ksoLLpW2a4YpAy5Eb+5fvmd9A7ALYtqmAOwrwQ2dETn4ySOZPEy9QzTRU5WmCkRNti m//y65r6uWpnlelSLal18gry26eUzNOP4USug54NdACb7Rhp5572FHaATADyr22Xmorc 0jwPW2zG0jP5RfjlL5nKTUF9haEe9kOw+cDnoESIJCPfLbX20apaBj/X1zpG9BQ7kSa9 Ojqjy6uoT0v8bfHRzl9lFZxZDn6qepktYYm3HyCNuEWkjXbKbr2xudXbC6u4+k4+3tTI u+TyqsschYG4DI7hmXz9ivkHcFSg20tD1eDb0CGjg6X7suFuZtnW7JJw4RVP7YHjDnjX EOaA== X-Gm-Message-State: AOAM532bddLix0FLrJ9fqavQwtOWLXxUAHHP3NhPE/xTTv/9fuRjSHKK /7wYK2xwfpJJhhPnmyCUhnR1henCtrnfuQ== X-Google-Smtp-Source: ABdhPJxMe7V6XCeb7NLyatBY1cz2sC5adkppmWFqQsqTFLDCjTquaPgCaTNphT8tilT7g4w15P3cTg== X-Received: by 2002:a5d:58c1:: with SMTP id o1mr1634936wrf.6.1628117685752; Wed, 04 Aug 2021 15:54:45 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id u11sm3968190wrt.89.2021.08.04.15.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 15:54:45 -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 v4 3/5] Makefile: don't use "FORCE" for tags targets Date: Thu, 5 Aug 2021 00:54:38 +0200 Message-Id: X-Mailer: git-send-email 2.33.0.rc0.597.gc569a812f0a 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 59c2e98795b..d1012cf71d2 100644 --- a/Makefile +++ b/Makefile @@ -2746,20 +2746,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):\ @@ -2943,7 +2947,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 Aug 4 22:54:39 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: 12419879 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 CD050C4338F for ; Wed, 4 Aug 2021 22:54:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B54F16109F for ; Wed, 4 Aug 2021 22:54:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235482AbhHDWzE (ORCPT ); Wed, 4 Aug 2021 18:55:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235070AbhHDWzB (ORCPT ); Wed, 4 Aug 2021 18:55:01 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17073C061798 for ; Wed, 4 Aug 2021 15:54:48 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id j2so3936222wrx.9 for ; Wed, 04 Aug 2021 15:54:48 -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=TUj7Awu517s52vf+83ewn1OOAWq3UA4TbIGIejmbBiI=; b=P/lC3uMSfFDTfyUOj/DjilJz7uExhAPxvzU3NLa66K49PtgycwoBrBuFyBcXbdq9mW /JeLdvhKNwci7szFOIj0Q+4uZB0ifaF4p4eXXNZn6le+3hDQ6Co6DZ3ceyc7DzRbnG8M vH8ghc5MCYxVgkOeiUjRgjFa0fQh/HmHDI+wy6uzPd9RkjVKB9hB18xSqxS0srKXXgEY XL1yFqHTCQT/+D7JJNIyFUNbfUyNhq+zaTfklSWn0GFYjKtS8SQqNDa88iy67MlrCNN3 PH47fQmX24Z0S66bYJKdbhmbuZCOl7H8maPOj9sK0N4cljNRUo80ZgWr2fJwwE2vv6ku 1wkw== 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=TUj7Awu517s52vf+83ewn1OOAWq3UA4TbIGIejmbBiI=; b=eCdYh/lrTS9PBREhs7E5pNQ9KjXeOLt48fQQyH0CNt1+6zFkoKoMkXYvK2HSaXQZpq ngzdqFcgAWFJ7nJBpKrRpOdM5NVmS6DiDGOjWWbR2MAPi0NgIeGlwcQ3DjLWh7wLZXxR amHJDWK+MAd5YLHuuFT81Mq/bfL4rvzn/+FSq7c1nxNZclNiT4BNEyVDN5vNgcRvF6Pz cK1zmdeggsKxze6GqdF3GD7BYTZhPm1OXlWcRMxNrolHsAyQYpGkq0uN+smM+wKgKk66 /58ajve5Ex6SFE42c3Pb8bLNJqeNsaf3/jrudATORhKkmPokYdaNlLzx2LnQUQHvWmkr NhaA== X-Gm-Message-State: AOAM532MbByEpoxaF9Mg+JEp3w+Nza6ylC5tHKJCaX4+uuVUV3dqHF0i WoK5D38N/8cG530aFFQ6WZjlhT3+qhh+TQ== X-Google-Smtp-Source: ABdhPJw0OTkf2Bd135xEuQ44G4kbT6A6LCQFPqrOwhB3yk3RKH+WJ5ib5BDUjZFnzVdKoq4NFbigoQ== X-Received: by 2002:adf:fb8f:: with SMTP id a15mr1613788wrr.92.1628117686488; Wed, 04 Aug 2021 15:54:46 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id u11sm3968190wrt.89.2021.08.04.15.54.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 15:54:46 -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 v4 4/5] Makefile: remove "cscope.out", not "cscope*" in cscope.out target Date: Thu, 5 Aug 2021 00:54:39 +0200 Message-Id: X-Mailer: git-send-email 2.33.0.rc0.597.gc569a812f0a In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Before we generate a "cscope.out" file, remove that file explicitly, and not everything matching "cscope*". This doesn't change any behavior of the Makefile in practice, but makes this rule less confusing, and consistent with other similar rules. The cscope target was added in a2a9150bf06 (makefile: Add a cscope target, 2007-10-06). It has always referred to cscope* instead of to cscope.out in .gitignore and the "clean" target, even though we only ever generated a cscope.out file. This was seemingly done to aid use-cases where someone invoked cscope with the "-q" flag, which would make it create a "cscope.in.out" and "cscope.po.out" files in addition to "cscope.out". But us removing those files we never generated is confusing, so let's only remove the file we need to, furthermore let's use the "-f" flag to explicitly name the cscope.out file, even though it's the default if not "-f" argument is supplied. It is somewhat inconsistent to change from the glob here but not in the "clean" rule and .gitignore, an earlier version of this change updated those as well, but see [1][2] for why they were kept. 1. https://lore.kernel.org/git/87k0lit57x.fsf@evledraar.gmail.com/ 2. https://lore.kernel.org/git/87im0kn983.fsf@evledraar.gmail.com/ Signed-off-by: Ævar Arnfjörð Bjarmason --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d1012cf71d2..2a176ba5742 100644 --- a/Makefile +++ b/Makefile @@ -2759,8 +2759,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) $@ && \ + echo $(FOUND_SOURCE_FILES) | xargs cscope -f$@ -b .PHONY: cscope cscope: cscope.out From patchwork Wed Aug 4 22:54:40 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: 12419881 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 4E9E2C432BE for ; Wed, 4 Aug 2021 22:54:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 371086104F for ; Wed, 4 Aug 2021 22:54:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235494AbhHDWzE (ORCPT ); Wed, 4 Aug 2021 18:55:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235398AbhHDWzC (ORCPT ); Wed, 4 Aug 2021 18:55:02 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF8BDC061799 for ; Wed, 4 Aug 2021 15:54:48 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id m12so3924100wru.12 for ; Wed, 04 Aug 2021 15:54:48 -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=J2x/ZjLflp6HNp75sXkUj9vz4JZF72p6+NeE5fq5cLQ=; b=JSX+I5qd+QGVUxIm6A0F47c3FrcMDu+ECougI038PkezSnpWyt+2uU3MmPyM9mkfOv TcdOgidfD4+yGEBE1alROOi4I2nyVmp5D07wUQ7Z2CZAU+ZGM8gkTVJJrh8VDRPtRTUu BqqQavwtiRbHQVXSeszC0N6vEzmNqwwOP+3vthnUiqR9XJL+cfoE2d/J7lzjfh7YXE+B 4W3W1qfzXpvOuQVoNXOOYhgPEovZpQIDh6jJTfm8GDylqPpz5iGrbg2/r3ZvE+/+4EkJ 9mWu73KJas5fNW8Ld3BGjOxGpZkQGBbAGfsoO1kWoyuMIkLKK23Ku1M0Upg8GNBPc+NM obJw== 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=J2x/ZjLflp6HNp75sXkUj9vz4JZF72p6+NeE5fq5cLQ=; b=PGOoQ6Vithh1BMLu/fClWnz2PAVi4NxhhgDDJgl58klmveyWByDVGcEyDZ3TgfrDyi /8FzldgZqvVEVBuAAeHCxIB2Tj+bSNxOmMmQ9B14jQimCPdLka1/DziaaZFNcvwh/2Ov zYMmfHcYUcyxCF6PmEy4ex4257s7ZIsn8cf02buNqQoyJko10xKsDSoCO+JDNcwGosYg clbPWsDhejCh7iD5ZDobsy9lGnhe5Jeb2SWkuIWWzYJAnAVVEBLqESsvXkA4w4iwM9d7 yDlx2ZlLjVM5HQNxdO0G97j0/EFfs9jtTxj44s1RHQDh+BE7po8cRtZ1yeK9qXjaN/3k uxVg== X-Gm-Message-State: AOAM533r7usJjR21HX1IeKF/3BM3kXda72SNhXwZWtfmXSrrtq+m5cou GILp6gKCI+P++Hec9aSeyus0B14N734KPQ== X-Google-Smtp-Source: ABdhPJyQzRznCdP4R9ZdTJnTaLNCjkEnB7pGeujZUNl9uebeCd0SsLv1f1ORtUbOvkFmWv1vsuKGEw== X-Received: by 2002:adf:fd90:: with SMTP id d16mr1647433wrr.105.1628117687310; Wed, 04 Aug 2021 15:54:47 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id u11sm3968190wrt.89.2021.08.04.15.54.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 15:54:46 -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 v4 5/5] Makefile: normalize clobbering & xargs for tags targets Date: Thu, 5 Aug 2021 00:54:40 +0200 Message-Id: X-Mailer: git-send-email 2.33.0.rc0.597.gc569a812f0a 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 2a176ba5742..1ad7a685d10 100644 --- a/Makefile +++ b/Makefile @@ -2749,18 +2749,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) $@ && \ - 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