From patchwork Mon Dec 7 00:31:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11954713 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 C43FFC433FE for ; Mon, 7 Dec 2020 00:32:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8D759224DF for ; Mon, 7 Dec 2020 00:32:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728075AbgLGAcF (ORCPT ); Sun, 6 Dec 2020 19:32:05 -0500 Received: from avasout01.plus.net ([84.93.230.227]:33380 "EHLO avasout01.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbgLGAcF (ORCPT ); Sun, 6 Dec 2020 19:32:05 -0500 Received: from [10.0.2.15] ([147.147.167.100]) by smtp with ESMTPA id m4RLkwQUCn8O7m4RMkbbPq; Mon, 07 Dec 2020 00:31:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1607301104; bh=DHHibXVpUqxpYo8MGGEPk7zn1EDWqEDrbF+ceWCWQ3k=; h=To:Cc:From:Subject:Date; b=pz5X28l+ku0Qa/dLo48g4Mbjj63cDc+8RDW96MU8yFI/Wq12gsHBOt3LJUnqeCmxT MnMujDCIMiC7f4UeT1PACEAMQXDdvZ5dFhBXLomUGSZSBW3abtql1/wQfqs0Ej8Qi3 e5LXVBbYKo/b360sk+QlJoEdhZgQd2NnIfVSctMTbDhMuFj9XY5SGfN9k2rkQpXDFL 5jyH10bqse8S+yMib443EyVOax3tcP2H55aWYmdjQ20pQCQ6f/fp/binZRo6apCc3w Brbi5AUKCqNNLJkDfoU9BcvVLEgNBWOtfea+hsAsXsHbmFU/CUFHssWT265cJrT8Tg 1rpSJNDsPFsdQ== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=Ld6nFgXi c=1 sm=1 tr=0 a=qL5TBQHgqnWGdG4DsQFN/Q==:117 a=qL5TBQHgqnWGdG4DsQFN/Q==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=WGfck5Sx_jJAHGwoxU0A:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 X-AUTH: ramsayjones@:2500 To: Junio C Hamano Cc: GIT Mailing-list From: Ramsay Jones Subject: [PATCH v2 1/5] Documentation/Makefile: conditionally include doc.dep Message-ID: Date: Mon, 7 Dec 2020 00:31:43 +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: MS4wfEcUaZwEGrstbDWSNrHucy5Q88pGkQj7ACTtyWCJ8m9HZhCQxGQZ9XKZCZn6gHCzN0C1W8/OKcmNIeAhNH6OF/Dw5NTRkBfGz+i9m/MM6gkaOWQAEtk/ QdHu915tMKGFbU1sbmQ+71AFGWPdHvd7ZECTuljdtJeKQ0uNXUxKM1KPMLlW8+BvqMYijlPEheabng== 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 (on 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. 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 Mon Dec 7 00:32:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11954715 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 5CCC1C4361B for ; Mon, 7 Dec 2020 00:33:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2222122509 for ; Mon, 7 Dec 2020 00:33:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728281AbgLGAdQ (ORCPT ); Sun, 6 Dec 2020 19:33:16 -0500 Received: from avasout01.plus.net ([84.93.230.227]:33380 "EHLO avasout01.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbgLGAdQ (ORCPT ); Sun, 6 Dec 2020 19:33:16 -0500 Received: from [10.0.2.15] ([147.147.167.100]) by smtp with ESMTPA id m4SUkwQYIn8O7m4SVkbbQM; Mon, 07 Dec 2020 00:32:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1607301175; bh=Af22eD85dsghLR2PX3f0Ji2nUV9RZXl+pRkRnEP/kYM=; h=To:Cc:From:Subject:Date; b=hqf/etOth6MEn+68Gdr3UKUSJPNAzipvDtMveFQHFkvchyhxikQnub1HY+PLTB5oP doRzoFXpc1eXDECLMNllb93ycyQDxC0EQe8ai3JolC5jPXiqC6aBe8P3BT1zjfFDo1 IacOTLaYJlYs/Qw6aBxyiZy1vqnpu+M5RPP+97pFfP36RTJdWMDQs7clJCwOmABabX VMtIHdaSgWUS/brUNX02XrycsiFzqiv5c+WFQJ1Yrk+Ub/g4GIuR972qCngn/LKcuy 4oR8UqqG1E9kB5eyqXL+VyF3ad+Fqwdqc92ly75AlOw2CKR1S9Fv+s6qZ6hQ1tiHAw 5i3aLSHee4RQA== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=Ld6nFgXi 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 From: Ramsay Jones Subject: [PATCH v2 2/5] Documentation/Makefile: conditionally include ../GIT-VERSION-FILE Message-ID: <3e085045-99d5-29ee-ed3f-076b1b8bb6b6@ramsayjones.plus.com> Date: Mon, 7 Dec 2020 00:32:54 +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: MS4wfKZmuwTrKRjRbvspwwpBIE1YnNiB7W0V9t0O4gzQrkqSrewHT+4IHEvoiTN4hwIAL/9okQRUN+yvyuL6eqMhtoMZNWZYzyEGWr0jaYsorznSoDkJprcR ePn6860Rw4AXpvgwQc7MqHQNBGaQdx6+svzbD0UG4vpWTLxKGNi2Pv3Oh7sHv7i8/O/RdIYajbGfLQ== 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 (on 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, so this 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 Mon Dec 7 00:34:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11954717 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 54E58C433FE for ; Mon, 7 Dec 2020 00:35:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1879B22ADF for ; Mon, 7 Dec 2020 00:35:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728321AbgLGAfR (ORCPT ); Sun, 6 Dec 2020 19:35:17 -0500 Received: from avasout01.plus.net ([84.93.230.227]:33556 "EHLO avasout01.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbgLGAfR (ORCPT ); Sun, 6 Dec 2020 19:35:17 -0500 Received: from [10.0.2.15] ([147.147.167.100]) by smtp with ESMTPA id m4U1kwQeIn8O7m4U2kbbR1; Mon, 07 Dec 2020 00:34:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1607301271; bh=ZspPBG9L2bMOreAQiDuu4CEWxyFOfFvQ+r3+w37A2ws=; h=To:Cc:From:Subject:Date; b=gbiVIdw7U0ItNT0V6y76RQFGPVJPjofrmFjEgro6pXz7RUjjcacWeCebnevuMezjG QB5WkctZB5MTiFjsEwOuKPEagWTxZvsuq0vvi0DV1Y8rHReixQficY7WqPOS85GzPp txpB2diGSEvjlg4ferOYTlQOJ/tWRye1YwA/DzZpfz2lsdqw2RwIUHVRYV5DE1COq1 NMtg7aKVaBDqsmf6I1cmZ3VeEb6XIm//RkhQHCHegBeiycoa5O6XZ4MgSenwgqGwFL WSa+v59uhJHb8vZ2GFAVS5PfnqCyRGvQPF3HUTSsy2iqPMCPw1D3EAnqByk0a+1WRi X1g52Tt8fs+nQ== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=Ld6nFgXi 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 From: Ramsay Jones Subject: [PATCH v2 3/5] gitweb/Makefile: conditionally include ../GIT-VERSION-FILE Message-ID: Date: Mon, 7 Dec 2020 00:34:29 +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: MS4wfKVwjiv/iF/hedXQkfUyW9KDkoR6jcfeGH2fPvJdayZRJjhPgzNFVgv6WSL+/2xUUsGhGE039FX+KEX4+psFL4/hc6PHBaC9q3WpnW6C1VbhcKjPS2gH zIN0aBHp4LGj1EXeTyx6fzrVS9qV16Fpieb8ooTIRm7hgb7RBN0zFV9NjN/KFSUOMtHMG7kQGzxoTQ== 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 (on 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, so this 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 Mon Dec 7 00:35:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11954719 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 DA4E4C433FE for ; Mon, 7 Dec 2020 00:35:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D2DD22ADF for ; Mon, 7 Dec 2020 00:35:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728356AbgLGAfr (ORCPT ); Sun, 6 Dec 2020 19:35:47 -0500 Received: from avasout01.plus.net ([84.93.230.227]:33556 "EHLO avasout01.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbgLGAfr (ORCPT ); Sun, 6 Dec 2020 19:35:47 -0500 Received: from [10.0.2.15] ([147.147.167.100]) by smtp with ESMTPA id m4UvkwQiCn8O7m4UwkbbRW; Mon, 07 Dec 2020 00:35:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1607301327; bh=jS9aItPTGFd99axC16npJeCBC+2in31YJk0L/OEAfuc=; h=To:Cc:From:Subject:Date; b=WPBTZTvzTkyqtHOz+qFn64PXopBdTlvklCfoaRSGU2g3whtDo7TkEGLW+7EdYlheX VPtXvX2bvrFbfncsRcNNAQqgtDwQazK0YcFV6j0NFVlKW/sZPQ1X8sFBxkNfIs76J3 J5k7GIe08vaXm82ugBcEdvXLpxFfdcRKD3aCOwKOE9schiEWT3mJIAmer2n5GlIG6M 2HBGBM2ZkShVQCAd68gxuUJ+eUUOlovoDJgO31uHMgM2XtetDVyPd+pl1Xpo3f80wW 5wF/F/SbXO+I0RZxYEEaN9s8S9Izol3NcV7d0QtGT4TUKlaA+RF18Zk7Ghj/3cqQYj W08eZmccqhvjw== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=Ld6nFgXi 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 v2 4/5] Makefile: don't try to clean old debian build product Message-ID: Date: Mon, 7 Dec 2020 00:35:25 +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: MS4wfLla+y765R6MmsU8BeKMfWoMBBIfFEISMvkuG+Lty67iALps6KOaCyaOThRAhjOBhz138L+FF9sL34vM7kBB5oFlZIkDnU8DK3Kt6m3IyHD72Sui98+j gXbUtgt1wFEJCIZZMLDTqOcGcwXD/FFWFtScOEjUXuwniPwM4IvJDtJQoZZkhUFft2VAKZcHmDr1lQ== 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 Mon Dec 7 00:36:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11954721 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 93092C433FE for ; Mon, 7 Dec 2020 00:37:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51D1C22D08 for ; Mon, 7 Dec 2020 00:37:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728446AbgLGAgs (ORCPT ); Sun, 6 Dec 2020 19:36:48 -0500 Received: from avasout01.plus.net ([84.93.230.227]:33556 "EHLO avasout01.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbgLGAgs (ORCPT ); Sun, 6 Dec 2020 19:36:48 -0500 Received: from [10.0.2.15] ([147.147.167.100]) by smtp with ESMTPA id m4VukwQlun8O7m4VvkbbRw; Mon, 07 Dec 2020 00:36:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1607301387; bh=YXTxsP4wW85bpUfWsIFOiKObY5kbloIglwJEgk0hVtg=; h=To:Cc:From:Subject:Date; b=jobwQpwiq1HipsUcv/3eWoAf3YYQ9Fwoff+kFCGO/yaeS6uGDfY2ECPNPebQirAFs nLmclnl5QsPyHkb3XadTyT5LCaQOzx5ZzP4F1vdqfht1hQKbZBfd8ynlNx1J7meQ3c vN02Sid0x6W8omxhnb/HOccUy+AC/pM3rrYwByh2L0A9/UuLpdStMO+dN27tzkbT9/ k+QhrL6FYTlLNmHG13x+khmGDT9m8wRjH05RWE0mJXG3BBkEz79bJRNeQzrhwHG/Vh gHONto//9+J1RDOmz/qy+e87IdUh61A7gTBIGaKjNVCdI21y7YklDxVo5Wp4QZNP4G tplxBh9G0QhKQ== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=Ld6nFgXi 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 v2 5/5] Makefile: don't use a versioned temp distribution directory Message-ID: <89325f36-9fae-9575-4fe9-fc6a9261fadb@ramsayjones.plus.com> Date: Mon, 7 Dec 2020 00:36:26 +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: MS4wfECbqnwsqS+ele6llkFxJG0am+7KHEwMo0xUfFiVlrS7LnR9skd3Dyt4w7I+GJesqtUMtHH3VrAHjPC1jROwRgiMZbDqnoPDk/+9fSinjXnOiEhYHyJs YV3Bv8mewl4MBs6vQifwswncT5olc7id9qrlj4ipcIfM7xdMH5hjbEciNu/gLMWltZxurUcyJScI5w== 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