From patchwork Thu Nov 5 21:02: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: 11885105 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=-11.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 EBA88C388F7 for ; Thu, 5 Nov 2020 21:02:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 86A5220719 for ; Thu, 5 Nov 2020 21:02:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=plus.com header.i=@plus.com header.b="TBraVFMq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732240AbgKEVC3 (ORCPT ); Thu, 5 Nov 2020 16:02:29 -0500 Received: from avasout03.plus.net ([84.93.230.244]:33869 "EHLO avasout03.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726729AbgKEVC3 (ORCPT ); Thu, 5 Nov 2020 16:02:29 -0500 Received: from [10.0.2.15] ([195.213.6.50]) by smtp with ESMTPA id amOokLswE99nqamOpkhVe8; Thu, 05 Nov 2020 21:02:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1604610147; bh=DHHibXVpUqxpYo8MGGEPk7zn1EDWqEDrbF+ceWCWQ3k=; h=To:Cc:From:Subject:Date; b=TBraVFMqJJ5SUZLYHkt4FIDAFs7YKE1oC4J4o/45vkn7oMFDGyBvd6s0gkE9lOdUH kIFlb4qcIAd3DoejJMtIB6tUt18I4y2lczV+YVMWL2KT565eXM3LvaNDC2gxFdv9f5 POHKkFBGDZsis6nMc6Dx0J1CU6egU0SEI6xnG2lCZySvVtuUzXjzGGWfX9J/mNU0+d EOxF2x85e7mmbMp++um3LR4mZA4/REVuu2S126FH+lq6LqrMXTgIfpTA9wcdNGW0ci wVrBFJtQrwTHdjK7JsPQbSJSjjeawD5HK29AT7xNNd+oTyVI+nbMcb46S/dVYcYn7Z 2cNyUOh+VgqYQ== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=Uoz4y94B c=1 sm=1 tr=0 a=n8v6pzUV7wpcOOJT0hzGjw==:117 a=n8v6pzUV7wpcOOJT0hzGjw==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=WGfck5Sx_jJAHGwoxU0A:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 X-AUTH: ramsayjones@:2500 To: GIT Mailing-list Cc: Junio C Hamano From: Ramsay Jones Subject: [PATCH 1/8] Documentation/Makefile: conditionally include doc.dep Message-ID: <7810d64d-c6d0-8a1a-b5b1-d29df70cb589@ramsayjones.plus.com> Date: Thu, 5 Nov 2020 21:02: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: MS4wfPsGy4dW3SmPE8OSMwubCAlKDF1auEhjIok25r9HVgZmXJRAnkKBQK8dCgUPFyNclC6BxhIYvuxwBV35QaEsUxKxL/9IEycVJyFQoxi1LEG2bkQvKQ2O 5F71NhDBQ8zXe8m2d493gg4f9a0rxGaPXJb/Se+Of25zVbU9lReTvPimfZk+lrggfiXQGQ2aA/5+qA== 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 Thu Nov 5 21:03:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11885107 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=-11.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 DD09CC388F7 for ; Thu, 5 Nov 2020 21:03:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6EB9020724 for ; Thu, 5 Nov 2020 21:03:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=plus.com header.i=@plus.com header.b="VSegxrTv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731965AbgKEVDv (ORCPT ); Thu, 5 Nov 2020 16:03:51 -0500 Received: from avasout03.plus.net ([84.93.230.244]:33938 "EHLO avasout03.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726729AbgKEVDv (ORCPT ); Thu, 5 Nov 2020 16:03:51 -0500 Received: from [10.0.2.15] ([195.213.6.50]) by smtp with ESMTPA id amQ9kLt1i99nqamQAkhVf5; Thu, 05 Nov 2020 21:03:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1604610230; bh=Af22eD85dsghLR2PX3f0Ji2nUV9RZXl+pRkRnEP/kYM=; h=To:Cc:From:Subject:Date; b=VSegxrTvXZZEZ1hEVJ0lnHEvT4izoUb6C6eRG0UZYrsPBR2UcXX9R8pEt7YQ1laPF uVRMle24yUQ1QkbqHT0YrTbqD6dASqYJo0l25pgzmEuJhNB5lpUTQdA9QWp+B5nh8m yW2M61XRqG9KhMR1SVtHrJ5EJYYArRSm+VEc1WPNqVkgbxfNWrKgWWHL07ZYm9I3JM REm9i3YUTS/hWDSBjvzslWS3x3++QrfCueuIJVreIA8GNaau0+NGYcMPyamEn7wNSw iwrfjgmzkNlQ1nTOMpac1HWe6gMvifUu055GiFboW/AeW69ankzt+tx5lFPeDexsJM xtB8UY0G4B0ng== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=Uoz4y94B c=1 sm=1 tr=0 a=n8v6pzUV7wpcOOJT0hzGjw==:117 a=n8v6pzUV7wpcOOJT0hzGjw==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=lLT4iZDIu0lhsO9_-yEA:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 a=Z5ABNNGmrOfJ6cZ5bIyy:22 a=jd6J4Gguk5HxikPWLKER:22 X-AUTH: ramsayjones@:2500 To: GIT Mailing-list Cc: Junio C Hamano From: Ramsay Jones Subject: [PATCH 2/8] Documentation/Makefile: conditionally include ../GIT-VERSION-FILE Message-ID: <32b7e1dc-8cc3-2236-08b8-4d268bbf8c0b@ramsayjones.plus.com> Date: Thu, 5 Nov 2020 21:03:49 +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: MS4wfC7SVfau2NGjN3xNxprb22sq1/ctpPxdwrCMPlFip7KOgy3YIhp1uNHJFiYeFa+KqTyN2f6g9n6muFRkE8e1k7UP6N3GhCVicgTqgzywotqKRCYewH3p fYHcWoOvqAhQUJBt/qU5EwkjcZsRE8VDAehYx2fV/C8U19j7CAyMVbhDlEJyamVSCnkiXsxNjVg7Xg== 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 Thu Nov 5 21:05:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11885109 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=-11.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 C2945C4741F for ; Thu, 5 Nov 2020 21:05:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C2EE20719 for ; Thu, 5 Nov 2020 21:05:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=plus.com header.i=@plus.com header.b="kXL9smls" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732046AbgKEVFQ (ORCPT ); Thu, 5 Nov 2020 16:05:16 -0500 Received: from avasout03.plus.net ([84.93.230.244]:34011 "EHLO avasout03.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726729AbgKEVFQ (ORCPT ); Thu, 5 Nov 2020 16:05:16 -0500 Received: from [10.0.2.15] ([195.213.6.50]) by smtp with ESMTPA id amRSkLt7K99nqamRTkhVg4; Thu, 05 Nov 2020 21:05:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1604610315; bh=ZspPBG9L2bMOreAQiDuu4CEWxyFOfFvQ+r3+w37A2ws=; h=To:Cc:From:Subject:Date; b=kXL9smlsQYcF1JwsCO43hQ4Zs7gLjSFe9Jh9czBjEtB3yQaRzIbbJSuocedlCaWsu 1KrqCfEM2pfG69490U4CdaCvPWoxpHEcghMyR2v5RaXAHlrB31/dp3d3L1OBlLaecy C85Zk2/vlZc2+MarBkfZ/gw5WrFp+uLfJuFzpl+HrEyFK8/x8QXnJ0xjlJ23tI+GHB VpFlxz2FlczvZr0WrkjDk+8ftpg1fafwEeohyI0bqucXhxuDWaWhWvdgIEDiSzI2Aa msZMpON9prXuVfH5a10C/R9qfS9PfTIEsLQXgtVjH5UaKVL299yKRi4caBhko5shOf 9k7bQtZz2Ws+Q== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=Uoz4y94B c=1 sm=1 tr=0 a=n8v6pzUV7wpcOOJT0hzGjw==:117 a=n8v6pzUV7wpcOOJT0hzGjw==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=awHaz76ZRxkwiDev0AUA:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 a=Z5ABNNGmrOfJ6cZ5bIyy:22 a=jd6J4Gguk5HxikPWLKER:22 X-AUTH: ramsayjones@:2500 To: GIT Mailing-list Cc: Junio C Hamano From: Ramsay Jones Subject: [PATCH 3/8] gitweb/Makefile: conditionally include ../GIT-VERSION-FILE Message-ID: <7f4f6db9-2573-6b7c-7858-7457fd2575de@ramsayjones.plus.com> Date: Thu, 5 Nov 2020 21:05:10 +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: MS4wfNcOe/B+jLnV/ZHLVdoeA6iojRXfe2r8aEaKtWtkVQ4NSvB3AVxfXHZ1VHGFT7dLPc92Cn5SyJZWAj7hINkV8LE712p6HCH2vJCJOj8wSA0tpbbVygcp dNC4vv8Gci2o6RSR6Y8XOPFFv5Cf2zcmkMcwPs/CLKDa9dzy9WOivzKEzZc61WvcklaYmZwSASmsMg== 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 Thu Nov 5 21:06:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11885111 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=-11.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 094E9C388F7 for ; Thu, 5 Nov 2020 21:06:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7703820719 for ; Thu, 5 Nov 2020 21:06:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=plus.com header.i=@plus.com header.b="b1X7tFR2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732099AbgKEVGZ (ORCPT ); Thu, 5 Nov 2020 16:06:25 -0500 Received: from avasout03.plus.net ([84.93.230.244]:34073 "EHLO avasout03.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726729AbgKEVGZ (ORCPT ); Thu, 5 Nov 2020 16:06:25 -0500 Received: from [10.0.2.15] ([195.213.6.50]) by smtp with ESMTPA id amSdkLtC199nqamSekhVgr; Thu, 05 Nov 2020 21:06:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1604610384; bh=v/tAPInQN3S84iLXAxw5kJVjQ7pwIBixITmBp9bkq6g=; h=To:Cc:From:Subject:Date; b=b1X7tFR2yYb2n9F9/JjMP3Y8nfpCoPszxVxS35CMfcdBD8Jju4JBZoWsIDyYj+XDl Bscf3lNtcjGJQTHYZwcdq3xQARv+FrriojNMivrfLFl56GCyiF2dr3aAzVkDVkajsW sXJdd5rnGiX3aX34fCZImtCF7/LmiNVwKPHTR3+BvYEMVM5UA4GiqUG5SnlcPGBczh fCQ2xROYrfNN1chla4wM80GkpYl41irAlPhbdvI7QsSA9Fsec788by4v/DIGvx3Jzi XQY8UZfOylvAquF40vaHiWlEHQr9EGHflQYuZQAEDLiOr0+3GztfqjfVlRHdTF5n3V Z0+J7b6rFjPvA== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=Uoz4y94B c=1 sm=1 tr=0 a=n8v6pzUV7wpcOOJT0hzGjw==:117 a=n8v6pzUV7wpcOOJT0hzGjw==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=gATyBR-rywtQC92RBn8A:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 X-AUTH: ramsayjones@:2500 To: GIT Mailing-list Cc: Junio C Hamano From: Ramsay Jones Subject: [PATCH 4/8] git-gui/Makefile: conditionally include GIT-VERSION-FILE Message-ID: Date: Thu, 5 Nov 2020 21:06:22 +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: MS4wfPpwq/lKd/d3cPj1buu1VJOEkdxmizAVBvqF3qk9YpKuhZSlCTO4NmSgRhC2I2HdaOHf8nGKqMwdYOSbllHynrdgEDEbTAtaDpR9IbNhFc/4KzbXHVVd QaAEM/SqR4TG0xk7kDxY0g/cYFVS2A0Sa4W659hk6YE5luvOQarxiXC5+B9GDKEvflUjPpw/lb5Dvg== 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 -C git-gui clean make[1]: Entering directory '/home/ramsay/git/git-gui' GITGUI_VERSION = 0.21.0.78.g38c2a rm -rf git-gui lib/tclIndex po/*.msg ... $ has been timed at 8.430s on my laptop (on old core i5-4200M @ 2.50GHz, 8GB RAM, 1TB HDD). Notice that the Makefile, as part of processing the 'clean' target, is updating the 'git-gui/GIT-VERSION-FILE' (not to be confused with the similarly named file at the root directory of the repository). This is to ensure that the $(GITGUI_VERSION) make variable is set, once that file had been included. (The Makefile target uses the 'git-gui/GIT-VERSION-GEN' script to generate that file, which should also not be confused with the similarly named script at the root). However, the 'clean' target does not use the $(GITGUI_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 6.454s, on my laptop, giving an improvement of 23.44%). Signed-off-by: Ramsay Jones --- git-gui/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-gui/Makefile b/git-gui/Makefile index f10caedaa7..56c85a85c1 100644 --- a/git-gui/Makefile +++ b/git-gui/Makefile @@ -9,7 +9,9 @@ all:: GIT-VERSION-FILE: FORCE @$(SHELL_PATH) ./GIT-VERSION-GEN +ifneq ($(MAKECMDGOALS),clean) -include GIT-VERSION-FILE +endif uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') From patchwork Thu Nov 5 21:07: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: 11885113 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=-11.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 B1CC7C388F7 for ; Thu, 5 Nov 2020 21:07:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B5BE20728 for ; Thu, 5 Nov 2020 21:07:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=plus.com header.i=@plus.com header.b="GENrfXaL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731954AbgKEVH3 (ORCPT ); Thu, 5 Nov 2020 16:07:29 -0500 Received: from avasout03.plus.net ([84.93.230.244]:34140 "EHLO avasout03.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726729AbgKEVH3 (ORCPT ); Thu, 5 Nov 2020 16:07:29 -0500 Received: from [10.0.2.15] ([195.213.6.50]) by smtp with ESMTPA id amTfkLtGM99nqamTgkhVhw; Thu, 05 Nov 2020 21:07:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1604610448; bh=jS9aItPTGFd99axC16npJeCBC+2in31YJk0L/OEAfuc=; h=To:Cc:From:Subject:Date; b=GENrfXaLtm0BexXtoWo4iKNCO39tQqgoLVBoUV7OQF3PbNWI7M6RJSyoK644fVkj/ BL7CtxaEeyKfAglgDM0wN7zplCDw4BsLuIe/zUD62R8wlBpFY/Ra5m43gxoyVxTpsp +zfP1hIymiqvQXOJOhMjC7w8AYUhKy/p7BivFTkTbT9jIRJQw8tS3TEK8Vbpp9ytlW Y8IG7oeJqaLYrOTP2FV1Lpq0fCA2Prn/Qrr3iatGA5kZKvY2Hp9b4e6uqH97d6OVDz EfQbBa1Zp/SWaIglS24eQWpKgYASn74o+NBCqPGGoiE32Z9Jml2u4myKTNyOGkBVzI t86oQ0e0SVc6g== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=Uoz4y94B c=1 sm=1 tr=0 a=n8v6pzUV7wpcOOJT0hzGjw==:117 a=n8v6pzUV7wpcOOJT0hzGjw==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=WC_maC_QWPM366MBaKIA:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 X-AUTH: ramsayjones@:2500 To: GIT Mailing-list Cc: Junio C Hamano From: Ramsay Jones Subject: [PATCH 5/8] Makefile: don't try to clean old debian build product Message-ID: <866fb59c-7548-5212-2274-73348abc8513@ramsayjones.plus.com> Date: Thu, 5 Nov 2020 21:07: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: MS4wfAOhZKDc2aFVx/vS5zLhngd7hhqdZpYxft/ah8xmq1yY3A/IwhWBp8BsMLQM7kCPdJjLk2OTNPqBkd9eHlZ75u8nL9JVDhbWFgTPEnU4MeQKT+vLHYBc IfReKIleD5wqoJcn9ZZ+lfJCVuSv1PjKF2mQ94wqPlTqjBfYriGGOo7zTfKiAJ9o1+SZHgytuLFapg== 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 Thu Nov 5 21:08:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11885115 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=-11.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 0A707C388F7 for ; Thu, 5 Nov 2020 21:08:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 98BBA20728 for ; Thu, 5 Nov 2020 21:08:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=plus.com header.i=@plus.com header.b="YbEUjY66" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732086AbgKEVIn (ORCPT ); Thu, 5 Nov 2020 16:08:43 -0500 Received: from avasout03.plus.net ([84.93.230.244]:34225 "EHLO avasout03.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726729AbgKEVIn (ORCPT ); Thu, 5 Nov 2020 16:08:43 -0500 Received: from [10.0.2.15] ([195.213.6.50]) by smtp with ESMTPA id amUqkLtMT99nqamUrkhVkB; Thu, 05 Nov 2020 21:08:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1604610522; bh=2LJeG7qTZ2YjWCVZAzXCMsM3m4Os1+pFTmUUO+zrb9M=; h=To:Cc:From:Subject:Date; b=YbEUjY66zVDQ0LwDp6levnQ54/9zgJMXMJj3ED2tYJXcQQD2c16chbLpdRoV4iE05 FstrQxNLj0T2Mt6GTK7oe1rBPau2P5MTXLm1xR4ej/k5nJfOuUVVrkSZbDAm0drmk9 PB3KK58HqKMrDDmIxQJ/rA9uxqc4SGIYflTgEAWl136PqEWw4WYVPvuo20ChPCKaFk OTWuKw1VQvPD8Mn/0TgOwrdCEVlycuzWxkD7k0+YGh/0t3v0ceyO2BZQLpRtfr8iow LfN/IFiNHDNw/n40PGVlipupFt72lGX10gSD23cJ0c4gJrfy+sbKtG2o6XHPGusD4m 4rYHlubfH1VpA== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=Uoz4y94B c=1 sm=1 tr=0 a=n8v6pzUV7wpcOOJT0hzGjw==:117 a=n8v6pzUV7wpcOOJT0hzGjw==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=12cImHxmkD7F_EgP1BAA:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 X-AUTH: ramsayjones@:2500 To: GIT Mailing-list Cc: Junio C Hamano From: Ramsay Jones Subject: [PATCH 6/8] Makefile: don't use a versioned temp distribution directory Message-ID: <5add11fe-6d94-f2e0-f91c-360a7844c720@ramsayjones.plus.com> Date: Thu, 5 Nov 2020 21:08:40 +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: MS4wfBOmjz7Y3PvEPpY9ENNebuPF5dMCD7Nde3uVSaQQW2wt94BsSV8QJmP3Dpa/tTInyVbMplfj7ZLZrdCzQ6G07ufmBAdddLDuBR63s7e9DJZ7pqHg9Wng KFf1HdN+a+BqbEtjOFz9hwZ/ox8wh0Vt5eBiN6yw7036DjJ3EQ4o8CybaWO11UmKx/gbIvZzYEwPVQ== 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 distibution tarball. A future patch requires the 'clean' target not to depend on the $(GIT_VERSION) variable. However, the $(GIT_TARNAME) variable contains $(GIT_VERSION) in its definition. 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 From patchwork Thu Nov 5 21:09:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11885117 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=-11.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 6F965C388F7 for ; Thu, 5 Nov 2020 21:09:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 025DC20724 for ; Thu, 5 Nov 2020 21:09:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=plus.com header.i=@plus.com header.b="n6nIYwq8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731899AbgKEVJx (ORCPT ); Thu, 5 Nov 2020 16:09:53 -0500 Received: from avasout03.plus.net ([84.93.230.244]:34282 "EHLO avasout03.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726729AbgKEVJw (ORCPT ); Thu, 5 Nov 2020 16:09:52 -0500 Received: from [10.0.2.15] ([195.213.6.50]) by smtp with ESMTPA id amVykLtRD99nqamVzkhVl1; Thu, 05 Nov 2020 21:09:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1604610591; bh=VTztjWAe6lDGJM/w9zS9NmRTSoDROmuOcK2soBHh+Og=; h=To:Cc:From:Subject:Date; b=n6nIYwq8lVq788fUhBzBUjRJdFeL7rXnBjR1HHt9pdNMjRg3+KMBAa0jDjkzQQMb8 D68Cyhtg0o+tTOX9hrTXYdFBd1mMclAByORvfdnXs+TVVzmJSErYNeMeWUhP9ebbjj RPiHi4MHtGUE23O5EA7RkdUc5H0BQiUjPLKulHdGb90m4haXrMfHfHff4mOLXQX87Q m+SaGr5uCuzXpsC64wfkJFkz0rt3rFHk54CgTL/lXj9rEefF9kk7qG76gidGltmj7t cz2+fnT5aFSGZGdp/0bnfcGqQVWwbWsVg/xWknLEqIEtCsXO/og5PAEKNLwzYoaC17 kCf5PwyLVc4pg== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=Uoz4y94B c=1 sm=1 tr=0 a=n8v6pzUV7wpcOOJT0hzGjw==:117 a=n8v6pzUV7wpcOOJT0hzGjw==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=S6w345GtZ0HUjcSwCL0A:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 X-AUTH: ramsayjones@:2500 To: GIT Mailing-list Cc: Junio C Hamano From: Ramsay Jones Subject: [PATCH 7/8] Makefile: don't delete dist tarballs directly by name Message-ID: <48fdd198-93ad-7282-27e6-9a0c6de93067@ramsayjones.plus.com> Date: Thu, 5 Nov 2020 21:09:49 +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: MS4wfAPZoYqboI/gE1ccq5i1lcN9WVgNygxAslHpr1sZVq9y1QrB6Yp+7vFCeFPdh+4K6wsfzxJlvQiX0IKqDznMf2kUFM165UXAIL4jZfaQV7MfQE7hSJ9q /MPvrIYN22Cu5pGJyHAE/KeuTE1PKW6D6ideMRuJ3sdM8/nkIn+MGm+lVo6wPRxM2nzJKU/BIUkV9w== Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org A future patch requires the 'clean' target not to depend, either directly or indirectly, on the $(GIT_VERSION) variable. However, the distribution tarballs, $(GIT_TARNAME).tar.gz, $(htmldocs).tar.gz and $(manpages).tar.gz, all depend on $(GIT_VERSION). The 'clean' target attempts to remove these tarballs by name and so has the unwanted dependency. The first attempt to remove this dependency involved creating the distribution tarballs in a new top-level directory (e.g. 'dist-tars/'), that didn't reference the version number, and could be simply removed in the 'clean' target. Unfortunately, this could lead to breaking an unknown number of scripts for an unknown number of developers. (This actually breaks one of my own scripts!). Despite this being my preferred solution, I had to abandon this approach, since I don't know what problems it may cause. The second attempt involved using a wildcard pattern, in place of the $(GIT_VERSION) variable, in the distribution tarball filenames. This also proved to be an inadequate solution, no matter how elaborate the pattern became, because it was always possible that it could lead to the removal of some '*.tar.gz' file that would, otherwise, not have been removed (eg. git-2.29.0-saved-build.tar.gz). Also, note that the current 'clean' target requires that you do not move the current branch away from the commit you were on, when creating the distribution tarballs, before issuing the 'make clean'. If you do so, then you will find that the tarballs are not removed: $ git checkout nclean ... $ make dist ... $ ls *.tar.gz git-2.29.0.6.g8255a76caf.tar.gz $ $ git checkout master Switched to branch 'master' Your branch is up to date with 'origin/master'. $ make clean ... rm -f git-2.29.2.154.g8a58376a31.tar.gz rm -f git-htmldocs-2.29.2.154.g8a58376a31.tar.gz git-manpages-2.29.2.154.g8a58376a31.tar.gz ... $ $ ls *.tar.gz git-2.29.0.6.g8255a76caf.tar.gz $ [I always find the documentation tarballs of the last release intact when I am just about to create the new tarballs for this release. This means that I invariably remove them by hand.] In order to remove the version dependency, append the name of each distribution tarball created, in the 'dist' and 'doc-dist' targets, to a file ('dist-tars'). Then in the 'clean' target, simply iterate through the names in this file, if any, removing them as we go. (Not forgetting to clean up the 'dist-tars' file as well). Signed-off-by: Ramsay Jones --- .gitignore | 1 + Makefile | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6232d33924..425b8cc2a4 100644 --- a/.gitignore +++ b/.gitignore @@ -191,6 +191,7 @@ /gitweb/static/gitweb.min.* /config-list.h /command-list.h +/dist-tars *.tar.gz *.dsc *.deb diff --git a/Makefile b/Makefile index 90e91a2185..bc9ce28bc3 100644 --- a/Makefile +++ b/Makefile @@ -3083,6 +3083,7 @@ dist: git-archive$(X) configure --prefix=$(GIT_TARNAME)/ HEAD^{tree} > $(GIT_TARNAME).tar @$(RM) -r .dist-tmp-dir gzip -f -9 $(GIT_TARNAME).tar + @echo $(GIT_TARNAME).tar.gz >>dist-tars rpm:: @echo >&2 "Use distro packaged sources to run rpmbuild" @@ -3112,6 +3113,7 @@ dist-doc: $(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar $(TAR_DIST_EXTRA_OPTS) . gzip -n -9 -f $(htmldocs).tar + @echo $(htmldocs).tar.gz >>dist-tars : $(RM) -r .doc-tmp-dir mkdir -p .doc-tmp-dir/man1 .doc-tmp-dir/man5 .doc-tmp-dir/man7 @@ -3122,6 +3124,7 @@ dist-doc: install cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar $(TAR_DIST_EXTRA_OPTS) . gzip -n -9 -f $(manpages).tar + @echo $(manpages).tar.gz >>dist-tars $(RM) -r .doc-tmp-dir ### Cleaning rules @@ -3151,8 +3154,12 @@ clean: profile-clean coverage-clean cocciclean $(RM) -r po/build/ $(RM) *.pyc *.pyo */*.pyc */*.pyo $(GENERATED_H) $(ETAGS_TARGET) tags cscope* $(RM) -r .dist-tmp-dir .doc-tmp-dir - $(RM) $(GIT_TARNAME).tar.gz - $(RM) $(htmldocs).tar.gz $(manpages).tar.gz + @if test -s dist-tars; then \ + for i in $$(cat dist-tars); do \ + $(RM) $$i; \ + done \ + fi + $(RM) dist-tars $(MAKE) -C Documentation/ clean $(RM) Documentation/GIT-EXCLUDED-PROGRAMS ifndef NO_PERL From patchwork Thu Nov 5 21:10:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11885119 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=-11.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 C443DC4741F for ; Thu, 5 Nov 2020 21:10:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 606CC20724 for ; Thu, 5 Nov 2020 21:10:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=plus.com header.i=@plus.com header.b="Fha4rnEU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732120AbgKEVKy (ORCPT ); Thu, 5 Nov 2020 16:10:54 -0500 Received: from avasout03.plus.net ([84.93.230.244]:34338 "EHLO avasout03.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726801AbgKEVKx (ORCPT ); Thu, 5 Nov 2020 16:10:53 -0500 Received: from [10.0.2.15] ([195.213.6.50]) by smtp with ESMTPA id amWxkLtVD99nqamWykhVlp; Thu, 05 Nov 2020 21:10:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1604610652; bh=Z7LKfJ7KQswo/vkM/0V0ZpAtVcTp579Ej3IP6KbpB8M=; h=To:Cc:From:Subject:Date; b=Fha4rnEUP1CgCZLT/507FbYBtt115V9drN0JMmbmTw7HYOlenNXyWlItHWhhyZ4yn rQJIsgvwlDMxd2SR+aCKFvTibP2BsFdCFTHH9/Cot8Y4eJpj92xaiTIaOz+584aUlt GGwA1/ac8qZ6Yn0UFsnTQcuthlXdMMRtp3Q01/9HMqxngoIFHwHCeWb9wlUaEAJ/pq yP650HVN2qsTLePcBi5TWx7CGgLZDRhetAWI5fbm0X6UdaOYp9mai6jlSuIGZlmKao fJTu8SJZMD1qzCwfDuZZSdabJ6HREO32/IaYoM6H02WZ8jbE8VXUCrRvUCGiMUVy5k WgpVv+cskcIpQ== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=Uoz4y94B c=1 sm=1 tr=0 a=n8v6pzUV7wpcOOJT0hzGjw==:117 a=n8v6pzUV7wpcOOJT0hzGjw==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=GBawf_CGCaMNpgGozlEA:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 X-AUTH: ramsayjones@:2500 To: GIT Mailing-list Cc: Junio C Hamano From: Ramsay Jones Subject: [PATCH 8/8] Makefile: conditionally include GIT-VERSION-FILE Message-ID: <75576fd6-29d7-9700-22a0-bcb30b6ba6bb@ramsayjones.plus.com> Date: Thu, 5 Nov 2020 21:10:51 +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: MS4wfBmjmEC5qjKLEfaqqNGnmRdZ2gfkgQKrykgzMIbp3SLedPUJJ3PEqqd34EzZYszE5iRV/EppTt01qnBgduH3TDwsbjqDenAU0E8OPEk8C/Qe8YrtJfaD ReerLTfG1E9oSTcdCF2zA0kuMd5JYu9XWrwIxjzpOC9jjlDNDaKGXi8BWlsfTTwj2M8/kKYDUtF2bw== 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 GIT_VERSION = 2.29.0.7.g273f7f9394 ... $ has been timed at 6.430s on my laptop (on old core i5-4200M @ 2.50GHz, 8GB RAM, 1TB HDD). Notice that the 'clean' target is still causing the $(GIT_VERSION) make variable to be set (executing the GIT-VERSION-GEN script in the process). However, the last few commits have removed all dependency on the $(GIT_VERSION) variable from the 'clean' target. The calculation of the git version, in order to set this variable, is thus 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 4.064s, on my laptop, giving an improvement of 36.80%). Signed-off-by: Ramsay Jones --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index bc9ce28bc3..ca65259e10 100644 --- a/Makefile +++ b/Makefile @@ -502,7 +502,9 @@ all:: GIT-VERSION-FILE: FORCE @$(SHELL_PATH) ./GIT-VERSION-GEN +ifneq ($(MAKECMDGOALS),clean) -include GIT-VERSION-FILE +endif # Set our default configuration. #