From: Edwin Török Date: Fri, 2 Dec 2022 17:17:32 +0000 (+0000) Subject: tools/ocaml: add 'make format' for OCaml files X-Git-Tag: 4.18.0-rc1~1138 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=aad8c1276cbe21b1306b32899e19875ca015267e;p=xen.git tools/ocaml: add 'make format' for OCaml files Using `ocp-indent` for now to just make minimal modifications in tabs vs spaces and get the right indentation. This avoids perpetuating a formatting style that is inconsistent with the rest of Xen, and that makes preparing and submitting patches more difficult (OCaml indentation tools usually only support spaces, not tabs). No functional change. Signed-off-by: Edwin Török Acked-by: Christian Lindig --- diff --git a/tools/ocaml/Makefile b/tools/ocaml/Makefile index a7c04b6546..85bfd087c9 100644 --- a/tools/ocaml/Makefile +++ b/tools/ocaml/Makefile @@ -34,3 +34,7 @@ build-tools-oxenstored: $(MAKE) -s -C libs/xb $(MAKE) -s -C libs/xc $(MAKE) -C xenstored + +.PHONY: format +format: + git ls-files '*.ml' '*.mli' | xargs -n1 ocp-indent -i