[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] tools/ocaml: do not run ocamldep during make clean



commit 2f2b76d47c5bcd9323a2acac8ba365013af34141
Author:     Edwin Török <edvin.torok@xxxxxxxxxx>
AuthorDate: Wed Aug 3 12:13:39 2022 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Aug 3 12:13:39 2022 +0200

    tools/ocaml: do not run ocamldep during make clean
    
    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>
    Acked-by: Christian Lindig <christian.lindig@xxxxxxxxxx>
---
 tools/ocaml/Makefile.rules | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/ocaml/Makefile.rules b/tools/ocaml/Makefile.rules
index 7e4db457a1..d368308d9b 100644
--- 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
 
 clean: $(CLEAN_HOOKS)
        $(Q)rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot 
*.spot *.spit $(LIBS) $(PROGRAMS) $(GENERATED_FILES) .ocamldep.make META
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.