From patchwork Tue Dec 8 22:31:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11959979 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.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 F1078C433FE for ; Tue, 8 Dec 2020 22:32:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD06F238EE for ; Tue, 8 Dec 2020 22:32:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730711AbgLHWcH (ORCPT ); Tue, 8 Dec 2020 17:32:07 -0500 Received: from avasout02.plus.net ([212.159.14.17]:60696 "EHLO avasout02.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730490AbgLHWcG (ORCPT ); Tue, 8 Dec 2020 17:32:06 -0500 Received: from [10.0.2.15] ([147.147.167.100]) by smtp with ESMTPA id mlWKkHHho0K1OmlWLkvn8I; Tue, 08 Dec 2020 22:31:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1607466706; bh=81uG1+QL4F6D2XE44Iznxiyqq5afFo+9zKZE92WNH/A=; h=To:Cc:From:Subject:Date; b=AiG8MebgoDgYW9uQhv/d2GNB37AgyKoaGYOuvEsII2/B90qDa7147VIJobTjyLUzD ljbnaicXpWnjmotLF+NGuT8lJKjsUxdoUQBpGkx/y9JTFGSQmFuE3wMZKwO5rQRtU9 pxp72U0rj3pm/w8RXQGlrhk3p4F629TF3efhGRjousK61K5KrS913fjS8AmDnqCtSO aEwaG3c2g8m/0dGZsV0DlNbgDqWvnosQyGDQxYTFReewSi8YSpHd9KaEati3V9zCUp 6z5i84bIIGvtLf08qFoTsUTfMuC4V4XTRS16SheIrzWLMchBBPxLorX1g+sd6ZW1l/ Hz1hlBLyM2P/Q== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=QaP9QvTv c=1 sm=1 tr=0 a=qL5TBQHgqnWGdG4DsQFN/Q==:117 a=qL5TBQHgqnWGdG4DsQFN/Q==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=fGLe8T8LZrKVVAFXI-8A:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 X-AUTH: ramsayjones@:2500 To: Junio C Hamano Cc: GIT Mailing-list , Felipe Contreras From: Ramsay Jones Subject: [PATCH v3 1/5] Documentation/Makefile: conditionally include doc.dep Message-ID: <88d87207-0668-2119-e63a-49384897c789@ramsayjones.plus.com> Date: Tue, 8 Dec 2020 22:31:44 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Language: en-GB X-CMAE-Envelope: MS4wfNRjIO31MUc7hcQf23qYqBQ6GMT0Uls+h9EdZmSRl0AGt4v/jyo84Ar+vyNUvaOCgpcGEhzgalG1wsYlfpyh5vN6Icu2CaVy+R6FYJu+Ena74tMefM5h lLURNbY50Ms0FyTZFMBghs+Fr39o7N2sp9JDdcD7DF1uAkGjPlO2CNQeYiJWJvldgnPqkSN1LyQUUg== Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The 'clean' target is noticeably slow on cygwin, even for a 'do-nothing' invocation of 'make clean'. For example, the second 'make clean' below: $ make clean >/dev/null 2>&1 $ make clean GIT_VERSION = 2.29.0 ... make[1]: Entering directory '/home/ramsay/git/Documentation' GEN mergetools-list.made GEN cmd-list.made GEN doc.dep ... $ has been timed at 23.339s, using git v2.29.0, on my laptop (an old core i5-4200M @ 2.50GHz, 8GB RAM, 1TB HDD). Notice that, since the 'doc.dep' file does not exist, make takes the time (about 8s) to generate several files in order to create the doc.dep include file. (If an 'include' file is missing, but a target for the said file is present in the Makefile, make will execute that target and, if that file now exists, throw away all its internal data and re-read and re-parse the Makefile). Having spent the time to include the 'doc.dep' file, the 'clean' target immediately deletes those files. The document dependencies specified in the 'doc.dep' include file, expressed as make targets and prerequisites, do not affect what the 'clean' target removes. Therefore, the time spent in generating the dependencies is completely wasted effort. In order to eliminate such wasted effort, use the value of the internal $(MAKECMDGOALS) variable to only '-include doc.dep' when the target is not 'clean'. (This drops the time down to 12.364s, on my laptop, giving an improvement of 47.02%). Signed-off-by: Ramsay Jones --- Documentation/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/Makefile b/Documentation/Makefile index 80d1908a44..652d57a1b6 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -286,7 +286,9 @@ doc.dep : $(docdep_prereqs) $(wildcard *.txt) $(wildcard config/*.txt) build-doc $(PERL_PATH) ./build-docdep.perl >$@+ $(QUIET_STDERR) && \ mv $@+ $@ +ifneq ($(MAKECMDGOALS),clean) -include doc.dep +endif cmds_txt = cmds-ancillaryinterrogators.txt \ cmds-ancillarymanipulators.txt \ From patchwork Tue Dec 8 22:33:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11959981 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.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 A1030C433FE for ; Tue, 8 Dec 2020 22:33:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5FDA0238EE for ; Tue, 8 Dec 2020 22:33:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731091AbgLHWd1 (ORCPT ); Tue, 8 Dec 2020 17:33:27 -0500 Received: from avasout02.plus.net ([212.159.14.17]:60696 "EHLO avasout02.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbgLHWd1 (ORCPT ); Tue, 8 Dec 2020 17:33:27 -0500 Received: from [10.0.2.15] ([147.147.167.100]) by smtp with ESMTPA id mlXdkHHom0K1OmlXekvn97; Tue, 08 Dec 2020 22:33:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1607466786; bh=WhZNZiIrLxcBfvXg+bO5LM0/I90b6D2oGcKheammcmA=; h=To:Cc:From:Subject:Date; b=Ujduz3zeGP1zw0rmCZv8TaZX6STeA5uy09OfBM4w+iexsZkOo1RJc2lEYVAUBT35Y YSuT7yFVUPrlnzm/11W5TMXngnIpMhSpU1anIgnm3jMBumr7lrRPVu7bvgyi+hmeUn oOT3u9ekXueYbUt6jXoAM+A18q9ejn4F9WpiK0Es5myAdsVavLBrRJ19UZAny1p/Ry rW7/zTUP9TBqAzTNMlVSCN3ZRrq+P7K1QoArlJeYDRU6J5L39ENqLUGhbzCRU80YLA eViwlWfravOYh1H+XZvswhqkQ+xjqoC89E28vr2FGeqq29NwEme8IC4N+MWvv5FMcb rEKQauLckoq4w== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=QaP9QvTv c=1 sm=1 tr=0 a=qL5TBQHgqnWGdG4DsQFN/Q==:117 a=qL5TBQHgqnWGdG4DsQFN/Q==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=lLT4iZDIu0lhsO9_-yEA:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 a=pHzHmUro8NiASowvMSCR:22 a=nt3jZW36AmriUCFCBwmW:22 X-AUTH: ramsayjones@:2500 To: Junio C Hamano Cc: GIT Mailing-list , Felipe Contreras From: Ramsay Jones Subject: [PATCH v3 2/5] Documentation/Makefile: conditionally include ../GIT-VERSION-FILE Message-ID: <7ada81c3-bb8a-6d63-88a9-e24ba11f1138@ramsayjones.plus.com> Date: Tue, 8 Dec 2020 22:33:05 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Language: en-GB X-CMAE-Envelope: MS4wfDR0L2aI/dElOrBiPRYNE20Purn38WaD46zbcFZaN3nSPmavmllt7EnUtBHpE9D6EL3eh3dGmmXSWcxZaTJuKJ1qK5mf9bf7h+Mt4mkIQeuMjAWQEQDV 1h/92klnWRyGzIkRFVDL3SdnUUqrIJW2mqTSsEh4ZUhW2N/2Vwtu3qpSkIxFi3a/aMrLts2n6YQO7g== Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The 'clean' target is still noticeably slow on cygwin, despite the substantial improvement made by the previous patch. For example, the second invocation of 'make clean' below: $ make clean >/dev/null 2>&1 $ make clean ... make[1]: Entering directory '/home/ramsay/git/Documentation' make[2]: Entering directory '/home/ramsay/git' make[2]: 'GIT-VERSION-FILE' is up to date. make[2]: Leaving directory '/home/ramsay/git' ... $ has been timed at 12.364s on my laptop (an old core i5-4200M @ 2.50GHz, 8GB RAM, 1TB HDD). Notice that the 'clean' target is making a nested call to the parent Makefile to ensure that the GIT-VERSION-FILE is up-to-date (prior to the previous patch, there would have been _two_ such invocations). This is to ensure that the $(GIT_VERSION) make variable is set, once that file had been included. However, the 'clean' target does not use the $(GIT_VERSION) variable, directly or indirectly, so it does not have any affect on what the target removes. Therefore, the time spent on ensuring an up to date GIT-VERSION-FILE is wasted effort. In order to eliminate such wasted effort, use the value of the internal $(MAKECMDGOALS) variable to only '-include ../GIT-VERSION-FILE' when the target is not 'clean'. (This drops the time down to 10.361s, on my laptop, giving an improvement of 16.20%). Signed-off-by: Ramsay Jones --- Documentation/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/Makefile b/Documentation/Makefile index 652d57a1b6..5c680024eb 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -272,7 +272,9 @@ install-html: html ../GIT-VERSION-FILE: FORCE $(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE +ifneq ($(MAKECMDGOALS),clean) -include ../GIT-VERSION-FILE +endif # # Determine "include::" file references in asciidoc files. From patchwork Tue Dec 8 22:34:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11959983 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.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 7917AC433FE for ; Tue, 8 Dec 2020 22:35:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 412D4238EE for ; Tue, 8 Dec 2020 22:35:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730547AbgLHWfQ (ORCPT ); Tue, 8 Dec 2020 17:35:16 -0500 Received: from avasout02.plus.net ([212.159.14.17]:60896 "EHLO avasout02.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729429AbgLHWfQ (ORCPT ); Tue, 8 Dec 2020 17:35:16 -0500 Received: from [10.0.2.15] ([147.147.167.100]) by smtp with ESMTPA id mlYykHHw90K1OmlYzkvn9v; Tue, 08 Dec 2020 22:34:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1607466870; bh=Kzue2oX0uswM9t+FcFGJSGcX8S+TQ2Nl/Mf6uWXPrmw=; h=To:Cc:From:Subject:Date; b=phQvJhU6E5Bm739X/c23ixXOykFLgTFbgVlSszVVUALD6zbH7ACtbXMxdv6JrOgQc C2NAAufkiHh4jYGP8I4dESpQUfGtPE10bQ4mWKD69Dtad++LNEz6V393zSTV+jamtc PFgIey6feNguQeIxn1bnT2Y+/wYsXt1/xoYTPqYXfplcv+PNfAt9OiFK4Ct7iiqHVW gIjXgEtJATez04pqUIt3QrBhTsSDTkIOym39Bc0LRggoQKn5xIeTl3b9x6JM2QJoWt XcJ5wyzeW6B1KgN8erzjmTAABRwKpposeL8s2/5QSGAEy4IMyiqAp39X0e3LN2vONZ g3WWM3Vkcfbhw== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=QaP9QvTv c=1 sm=1 tr=0 a=qL5TBQHgqnWGdG4DsQFN/Q==:117 a=qL5TBQHgqnWGdG4DsQFN/Q==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=awHaz76ZRxkwiDev0AUA:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 a=pHzHmUro8NiASowvMSCR:22 a=nt3jZW36AmriUCFCBwmW:22 X-AUTH: ramsayjones@:2500 To: Junio C Hamano Cc: GIT Mailing-list , Felipe Contreras From: Ramsay Jones Subject: [PATCH v3 3/5] gitweb/Makefile: conditionally include ../GIT-VERSION-FILE Message-ID: <8aa9a686-94f1-e29c-6581-2d8d53bd55e0@ramsayjones.plus.com> Date: Tue, 8 Dec 2020 22:34:28 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Language: en-GB X-CMAE-Envelope: MS4wfBuORL4R0kuaMopT4x7QgX/79FWuvP6Sv9PkVpfoTtR3VZtCtpSxt/mXge+E1m2dF9sa8zrezW5gYlrSeoYW5AfYZBy9K6h4CAW7WJeMRY1YaxnR038P sP21SeiTM7yPf6VfmFGJ1WaqW9jrEX6w+buulbiK8qRNj+Ly2pVxa0w7B1Qtjl6Go72JqaoR6mhNWA== Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The 'clean' target is still noticeably slow on cygwin, despite the improvements made by previous patches. For example, the second invocation of 'make clean' below: $ make clean >/dev/null 2>&1 $ make clean ... make[1]: Entering directory '/home/ramsay/git/gitweb' make[2]: Entering directory '/home/ramsay/git' make[2]: 'GIT-VERSION-FILE' is up to date. make[2]: Leaving directory '/home/ramsay/git' ... $ has been timed at 10.361s on my laptop (an old core i5-4200M @ 2.50GHz, 8GB RAM, 1TB HDD). Notice that the 'clean' target is making a nested call to the parent Makefile to ensure that the GIT-VERSION-FILE is up-to-date. This is to ensure that the $(GIT_VERSION) make variable is set, once that file had been included. However, the 'clean' target does not use the $(GIT_VERSION) variable, directly or indirectly, so it does not have any affect on what the target removes. Therefore, the time spent on ensuring an up to date GIT-VERSION-FILE is wasted effort. In order to eliminate such wasted effort, use the value of the internal $(MAKECMDGOALS) variable to only '-include ../GIT-VERSION-FILE' when the target is not 'clean'. (This drops the time down to 8.430s, on my laptop, giving an improvement of 18.64%). Signed-off-by: Ramsay Jones --- gitweb/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gitweb/Makefile b/gitweb/Makefile index cd194d057f..f13e23c4de 100644 --- a/gitweb/Makefile +++ b/gitweb/Makefile @@ -48,7 +48,9 @@ HIGHLIGHT_BIN = highlight ../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE $(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE +ifneq ($(MAKECMDGOALS),clean) -include ../GIT-VERSION-FILE +endif ### Build rules From patchwork Tue Dec 8 22:35:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11959985 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.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 4DA26C433FE for ; Tue, 8 Dec 2020 22:35:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04069239FD for ; Tue, 8 Dec 2020 22:35:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731136AbgLHWft (ORCPT ); Tue, 8 Dec 2020 17:35:49 -0500 Received: from avasout02.plus.net ([212.159.14.17]:60896 "EHLO avasout02.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729323AbgLHWft (ORCPT ); Tue, 8 Dec 2020 17:35:49 -0500 Received: from [10.0.2.15] ([147.147.167.100]) by smtp with ESMTPA id mlZvkHI1o0K1OmlZwkvnBF; Tue, 08 Dec 2020 22:35:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1607466928; bh=jS9aItPTGFd99axC16npJeCBC+2in31YJk0L/OEAfuc=; h=To:Cc:From:Subject:Date; b=LVRoSvvj5wHv5a+tUWbeatR1yRjYV2SMEIN7Z0LNUYXYRNMr/KnK28tR7qMsbkB7F UgVpP4Es5m1FbFqUCtoRXIAPpkfy7tm3w7I2XgOqXt43kWP//Teg/uiRE/N8Tk+wma 7vXDSyK/9KbsMWZEH29QyozgBTfARDUfe5276gECwnljuThduHQh7P3WL0irnbSYkj aRenUZJ5fLyN8c5EC04wlzN9zO0GF/nGY5qmGJxg/BSzrYgmniZHkuViQFMXYOx5J0 gCqtWs+CR96vHv09LF87bwF0TfWau2ekE8ymqyJIAqIgPhbKL72rbXoXnbvpJvRY+2 afk3FawWBADWg== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=QaP9QvTv c=1 sm=1 tr=0 a=qL5TBQHgqnWGdG4DsQFN/Q==:117 a=qL5TBQHgqnWGdG4DsQFN/Q==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=WC_maC_QWPM366MBaKIA:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 X-AUTH: ramsayjones@:2500 To: Junio C Hamano Cc: GIT Mailing-list From: Ramsay Jones Subject: [PATCH v3 4/5] Makefile: don't try to clean old debian build product Message-ID: Date: Tue, 8 Dec 2020 22:35:27 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Language: en-GB X-CMAE-Envelope: MS4wfPlCRMUCwMfckRk9y93iGy3S+TXtjRf+0kMPFXSV0MRBfPYyo/Ctu4HsJAv/qbGYWEs952GulRmiusvDN5AMif4HhFE3FZdY3+smMj6FleRaW/fBNDq1 qe11BP0ieFS7QBfn1131u01aSA9ZzGEkGIYRWfjR9CjOaEfISeZv/QnqinGkhPnrwPEZhK9uc5uMiA== Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The 'clean' target includes code to remove an '*.tar.gz' file that was the by-product of a debian build. This was originally added by commit 5a571cdd8a (Clean generated files a bit more, to cope with Debian build droppings., 2005-08-12). However, all support for the 'debian build' was dropped by commit 7d0e65b892 (Retire debian/ directory., 2006-01-06), which seems to have simply forgotten to remove the 'git-core_$(GIT_VERSION)-*.tar.gz' from the 'clean' target. Remove it now. Signed-off-by: Ramsay Jones --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 95571ee3fc..09d6f23b88 100644 --- a/Makefile +++ b/Makefile @@ -3150,7 +3150,7 @@ clean: profile-clean coverage-clean cocciclean $(RM) -r po/build/ $(RM) *.pyc *.pyo */*.pyc */*.pyo $(GENERATED_H) $(ETAGS_TARGET) tags cscope* $(RM) -r $(GIT_TARNAME) .doc-tmp-dir - $(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz + $(RM) $(GIT_TARNAME).tar.gz $(RM) $(htmldocs).tar.gz $(manpages).tar.gz $(MAKE) -C Documentation/ clean $(RM) Documentation/GIT-EXCLUDED-PROGRAMS From patchwork Tue Dec 8 22:36:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11959987 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.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 833D4C4361B for ; Tue, 8 Dec 2020 22:36:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 420B623AC8 for ; Tue, 8 Dec 2020 22:36:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730798AbgLHWgz (ORCPT ); Tue, 8 Dec 2020 17:36:55 -0500 Received: from avasout02.plus.net ([212.159.14.17]:60896 "EHLO avasout02.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbgLHWgz (ORCPT ); Tue, 8 Dec 2020 17:36:55 -0500 Received: from [10.0.2.15] ([147.147.167.100]) by smtp with ESMTPA id mlazkHI7Y0K1Omlb0kvnBp; Tue, 08 Dec 2020 22:36:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1607466994; bh=YXTxsP4wW85bpUfWsIFOiKObY5kbloIglwJEgk0hVtg=; h=To:Cc:From:Subject:Date; b=ekkZtzUPQ5l6ej65ok9YqviPmt+Q54eK3j1UaTW6Lz7lgGdDsDmMStEfhl0I+hLmM 7MK4JDtWsp005r82zn6Gt/7lU+seYlL1gW8DGR3qjR33pKVGi/+j966HjOKiKUIoxk W2OOdjFIWhl2Le2pGbOZkBu9WCfHt7y+vni9iFLBvP/nzwFU31iuRnP/JTLLTsO+Hl kJp3EtlDVF3Y4P2xN4DlUz/x6mMkTLxZ9xUqraB/UCUNTXFCROWFBKndRqHlbAMZ69 fAt1GsxZQLt+UD1o1SbmyF8wfKV+9CBqySb0Bs9pzkAL8zZQaoqYkhoMesVy2cheA0 NLL2Awj8uqViw== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=QaP9QvTv c=1 sm=1 tr=0 a=qL5TBQHgqnWGdG4DsQFN/Q==:117 a=qL5TBQHgqnWGdG4DsQFN/Q==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=12cImHxmkD7F_EgP1BAA:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 X-AUTH: ramsayjones@:2500 To: Junio C Hamano Cc: GIT Mailing-list From: Ramsay Jones Subject: [PATCH v3 5/5] Makefile: don't use a versioned temp distribution directory Message-ID: <89173add-2919-8a28-9e06-ca4a0c2a5ffb@ramsayjones.plus.com> Date: Tue, 8 Dec 2020 22:36:33 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Language: en-GB X-CMAE-Envelope: MS4wfFcSshLEAn6vfvCwzgZ4p6CJ1cOZ3ehNvuQ/daU8U3OldTrAvVHjbQkeVU1fH9qRevwDR3sJmqPS6JX3LoRVh3pni7N3l/E7WjW25LmpR8MkKGG+sWXl AsS+1Wu3KgM6ldav3/hgVGymxp9Ws5pY69q/f0FHDXO7sf5MZgggEzykzl2/8SsH4KDhgvaDpg6/8g== Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The 'dist' target uses a versioned temp directory, $(GIT_TARNAME), into which it copies various files added to the distribution tarball. Should it be necessary to remove this directory in the 'clean' target, since the name depends on $(GIT_VERSION), the current HEAD must be positioned on the same commit as when 'make dist' was issued. Otherwise, the target will fail to remove that directory. Create an '.dist-tmp-dir' directory and copy the various files into this now un-versioned directory while creating the distribution tarball. Change the 'clean' target to remove the '.dist-tmp-dir' directory, instead of the version dependent $(GIT_TARNAME) directory. Signed-off-by: Ramsay Jones --- Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 09d6f23b88..90e91a2185 100644 --- a/Makefile +++ b/Makefile @@ -3060,9 +3060,9 @@ GIT_TARNAME = git-$(GIT_VERSION) GIT_ARCHIVE_EXTRA_FILES = \ --prefix=$(GIT_TARNAME)/ \ --add-file=configure \ - --add-file=$(GIT_TARNAME)/version \ + --add-file=.dist-tmp-dir/version \ --prefix=$(GIT_TARNAME)/git-gui/ \ - --add-file=$(GIT_TARNAME)/git-gui/version + --add-file=.dist-tmp-dir/git-gui/version ifdef DC_SHA1_SUBMODULE GIT_ARCHIVE_EXTRA_FILES += \ --prefix=$(GIT_TARNAME)/sha1collisiondetection/ \ @@ -3074,13 +3074,14 @@ GIT_ARCHIVE_EXTRA_FILES += \ --add-file=sha1collisiondetection/lib/ubc_check.h endif dist: git-archive$(X) configure - @mkdir -p $(GIT_TARNAME) - @echo $(GIT_VERSION) > $(GIT_TARNAME)/version - @$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version + @$(RM) -r .dist-tmp-dir + @mkdir .dist-tmp-dir + @echo $(GIT_VERSION) > .dist-tmp-dir/version + @$(MAKE) -C git-gui TARDIR=../.dist-tmp-dir/git-gui dist-version ./git-archive --format=tar \ $(GIT_ARCHIVE_EXTRA_FILES) \ --prefix=$(GIT_TARNAME)/ HEAD^{tree} > $(GIT_TARNAME).tar - @$(RM) -r $(GIT_TARNAME) + @$(RM) -r .dist-tmp-dir gzip -f -9 $(GIT_TARNAME).tar rpm:: @@ -3149,7 +3150,7 @@ clean: profile-clean coverage-clean cocciclean $(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) -r $(GIT_TARNAME) .doc-tmp-dir + $(RM) -r .dist-tmp-dir .doc-tmp-dir $(RM) $(GIT_TARNAME).tar.gz $(RM) $(htmldocs).tar.gz $(manpages).tar.gz $(MAKE) -C Documentation/ clean