[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 1/7] tools/ocaml/Makefile: do not run ocamldep during make clean
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Edwin Torok <edvin.torok@xxxxxxxxxx>
- Date: Wed, 3 Aug 2022 10:24:26 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mGNRwlacwTxgIjc2OVx4+MHoRHgRebh989lPy2POGE8=; b=MMyNb8r6RWL2eENhiFsXB7vQG8x6zfrU+VSRbq9GqBvFghV/917asSp6vNqfaybjagF9pZuUIa730qei96qmA2Q1/Kb50quFU1Tk0RBAw16Iv0fc4PtO8t9YR2PYcDLd4JZXdnA2MneeBqWm770KUyX6GVRUtW2pM1pSTfDDQzbCeXRmDctvZb9uFgweG+w46a/NKyNnf58B4JQJU0KIB/Pm3a+jscftpQIV4fF/W87pTzSoAtVAxD5+Nzc0pWhx6Aaait4bVfiKhDllcCCVwmrE326EQiwrXStdIGhF0j8ziTHmFaVt11Ftp70BAt4jeJt9CAcCBPu5sCwvI6AM/A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d53y0CynJRkz1KCSfjKX53G+KrmQgdHM1+XDKyFtgSzKY6JLi5c8s1bLCOUNe3bZ3JHPUhHxqsJIlO+CnpvauPlpYMnPAQWHOTOWelIptDED8wG/LFoqZfIZhsRdmRoLUzEpdahV8FiLP2s2HNJnxIr07a58TwSRB/p7sMJTKDf2Q06HiTsN22fUrcoZGkpUghjG3Aem/r5CEiII6BvSqJZym/hoKxmGA2b6ut8wGHs10h37+2gfb/RqUsItAwCutxaR4nyFXc25Tq6LdpGVcu5tD8ksO2wSsWE3hx/z/sG5kSHPyPDXb/jALHXIJt1yklKLoE1UykYgPf1P4g0E2w==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Wed, 03 Aug 2022 10:24:39 +0000
- Ironport-data: A9a23:Fp5qCq60K7fPOUeSGUI/xwxRtBfGchMFZxGqfqrLsTDasY5as4F+v mtKXTiObqrbamH9eIojao+29koD6sWBxtFjGQZvpCEyHi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuVGuG96yM6jclkf5KkYMbcICd9WAR4fykojBNnioYRj5VhxNO0GGthg /uryyHkEALjimUc3l48sfrZ8ks/5K+q4lv0g3RlDRx1lA6G/5UqJMp3yZGZdxPQXoRSF+imc OfPpJnRErTxpkpF5nuNy94XQ2VSKlLgFVHmZkl+AsBOtiNqtC0qupvXAdJHAathZ5dlqPgqo DlFncTYpQ7EpcQgksxFO/VTO3kW0aGrZNYriJVw2CCe5xSuTpfi/xlhJE0mELIxp7tvPVNX7 awhNj1UVU+Pgf3jldpXSsE07igiBO/CGdpH/1tGknTeB/tgRo3fSaLX49MexC03ms1FAffZY YwedCZraxPDJRZIPz/7CrpnxLvu2ia5LGUe8QrFzUY0yzG7IAhZ3bTzMdyTZtuQQsZ9lUeEv GPWuW/+B3n2MfTAlmDbqiP234cjmwvgZ64LMIyV18RRgUWLzEEcVg0XDgaS9KzRZkmWHog3x 1Yv0igkoLU29UerZsLgRBD+q3mB1jYQUsRdO/c34waMzuzT+QnxLncAZi5MbpohrsBebSwn0 BqFks3kARRrsaaJUjSN+7GMtzSwNCMJa2gYakc5oRAt5tDipMQ5iE3JR9M6SKqt1IStSXf33 iyAqzU4i/MLl8kX2q6n/FfBxTWxupzOSQ1z7QLSNo640j5EiEeeT9TAwTDmATxode51knHpU KA4pvWj
- Ironport-hdrordr: A9a23:wboTGaEkuo8tf8jEpLqFS5HXdLJyesId70hD6qkvc3Fom52j/f xGws5x6fatskdrZJkh8erwW5Vp2RvnhNNICPoqTM2ftW7dySeVxeBZnMHfKljbdxEWmdQtsp uIH5IeNDS0NykDsS+Y2nj2Lz9D+qjgzEnAv463oBlQpENRGthdBmxCe2Sm+zhNNW177O0CZf +hD6R8xwaISDAyVICWF3MFV+/Mq5ngj5T9eyMLABYh9U2nkS6owKSSKWnY4j4uFxd0hZsy+2 nMlAL0oo+5teug9xPa32jPq7xLhdrazMdZDsDksLlUFtyssHfqWG1SYczGgNkHmpDq1L/sqq iKn/4UBbUw15oWRBDynfKi4Xi47N9k0Q6e9bbRuwqenSW+fkN1NyMJv/MmTjLJr0Unp91yy6 RNwiaQsIdWFwrJmGDn68HPTAwCrDv8nZKz+dRj8EC3fLFuH4O5l7Zvin99AdMFBmb3+YonGO 5hAIXV4+tXa0qTazTcsnN0yNKhU3wvFlPeK3Jy8fC9wnxThjR03kEYzMsQkjMJ8488UYBN46 DBPr5znL9DQ8cKZeZ2BfsHQ8GwFmvRKCi8eF66MBDiDuUKKnjNo5n47PE84/yrYoUByN8olJ HIQDpjxBoPkoLVeLizNbFwg2DwqT+GLEXQI+lllutEk6y5Qqb3OiueT11rm9e8opwkc7/mZ8 o=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYo3Q1+zzg+oK1BUGAK7B2d/MLMq2c/V8AgAACIYA=
- Thread-topic: [PATCH v1 1/7] tools/ocaml/Makefile: do not run ocamldep during make clean
> On 3 Aug 2022, at 11:16, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> On 29.07.2022 19:53, Edwin Török wrote:
>> Trying to include .ocamldep.make will cause it to be generated if it
>> doesn't exist.
>> We do not want this during make clean: we would remove it anyway.
>>
>> Speeds up make clean.
>>
>> Before (measured on f732240fd3bac25116151db5ddeb7203b62e85ce, July 2022):
>> ```
>> Parsing
>> /home/edwin/xen2/tools/ocaml/libs/xl/../../../../tools/libs/light/libxl_types.idl
>> Parsing
>> /home/edwin/xen2/tools/ocaml/libs/xl/../../../../tools/libs/light/libxl_types.idl
>> Parsing
>> /home/edwin/xen2/tools/ocaml/libs/xl/../../../../tools/libs/light/libxl_types.idl
>> Parsing
>> /home/edwin/xen2/tools/ocaml/libs/xl/../../../../tools/libs/light/libxl_types.idl
>> Parsing
>> /home/edwin/xen2/tools/ocaml/libs/xl/../../../../tools/libs/light/libxl_types.idl
>>
>> Performance counter stats for 'make clean -j8 -s' (5 runs):
>>
>> 4.2233 +- 0.0208 seconds time elapsed ( +- 0.49% )
>> ```
>>
>> After:
>> ```
>> perf stat -r 5 --null make clean -j8 -s
>>
>> Performance counter stats for 'make clean -j8 -s' (5 runs):
>>
>> 2.7325 +- 0.0138 seconds time elapsed ( +- 0.51% )
>> ```
>>
>> No functional change.
>>
>> Signed-off-by: Edwin Török <edvin.torok@xxxxxxxxxx>
>
> I've committed this as is since it was acked and is an improvement
> in any event, but ...
>
>> --- a/tools/ocaml/Makefile.rules
>> +++ b/tools/ocaml/Makefile.rules
>> @@ -44,8 +44,10 @@ META: META.in
>>
>> ALL_OCAML_OBJ_SOURCES=$(addsuffix .ml, $(ALL_OCAML_OBJS))
>>
>> +ifneq ($(MAKECMDGOALS),clean)
>> .ocamldep.make: $(ALL_OCAML_OBJ_SOURCES) Makefile
>> $(OCAML_TOPLEVEL)/Makefile.rules
>> $(call quiet-command, $(OCAMLDEP) $(ALL_OCAML_OBJ_SOURCES) *.mli
>> $o,MLDEP,)
>> +endif
>
> ... what about the distclean goal?
Thanks for the suggestion, I see other Makefiles using 'findstring clean',
would that be appropriate here?
Something like this perhaps?
From 53cbf81a9c7d5090443b5fe5de37a47118ac53d8 Mon Sep 17 00:00:00 2001
Message-Id:
<53cbf81a9c7d5090443b5fe5de37a47118ac53d8.1659522178.git.edvin.torok@xxxxxxxxxx>
From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= <edvin.torok@xxxxxxxxxx>
To: xen-devel@xxxxxxxxxxxxxxxxxxxx
Cc: Christian Lindig <christian.lindig@xxxxxxxxxx>
Cc: David Scott <dave@xxxxxxxxxx>
Cc: Wei Liu <wl@xxxxxxx>
Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Date: Wed, 3 Aug 2022 11:21:46 +0100
Subject: [PATCH] tools/ocaml/Makefile.rules: do not run ocamldep on distclean
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Edwin Török <edvin.torok@xxxxxxxxxx>
---
tools/ocaml/Makefile.rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/ocaml/Makefile.rules b/tools/ocaml/Makefile.rules
index d368308d9b..c1c5dd3b39 100644
--- a/tools/ocaml/Makefile.rules
+++ b/tools/ocaml/Makefile.rules
@@ -44,7 +44,7 @@ META: META.in
ALL_OCAML_OBJ_SOURCES=$(addsuffix .ml, $(ALL_OCAML_OBJS))
-ifneq ($(MAKECMDGOALS),clean)
+ifeq (,$(findstring clean,$(MAKECMDGOALS)))
.ocamldep.make: $(ALL_OCAML_OBJ_SOURCES) Makefile
$(OCAML_TOPLEVEL)/Makefile.rules
$(call quiet-command, $(OCAMLDEP) $(ALL_OCAML_OBJ_SOURCES) *.mli
$o,MLDEP,)
endif
--
2.34.1
|