From bab005a835a83f537e7a9904580f954bf945780c Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Tue, 5 May 2020 03:30:44 -0700 Subject: [PATCH] [ocamlformat] Support passing args to ocamlformat Summary: Useful for testing / debugging ocamlformat updates Reviewed By: skcho Differential Revision: D21395971 fbshipit-source-id: d4f2f2dcb --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 35bfcab8c..8a0031525 100644 --- a/Makefile +++ b/Makefile @@ -218,19 +218,19 @@ fb-setup: .PHONY: fmt fmt: - parallel $(OCAMLFORMAT_EXE) -i ::: $$(git diff --name-only --diff-filter=ACMRU $$(git merge-base origin/master HEAD) | grep "\.mli\?$$") + parallel $(OCAMLFORMAT_EXE) $(OCAMLFORMAT_ARGS) -i ::: $$(git diff --name-only --diff-filter=ACMRU $$(git merge-base origin/master HEAD) | grep "\.mli\?$$") DUNE_ML:=$(shell find * -name 'dune*.in' | grep -v workspace | grep -v infer-source) .PHONY: fmt_dune fmt_dune: - parallel $(OCAMLFORMAT_EXE) -i ::: $(DUNE_ML) + parallel $(OCAMLFORMAT_EXE) $(OCAMLFORMAT_ARGS) -i ::: $(DUNE_ML) SRC_ML:=$(shell find * \( -name _build -or -name facebook-clang-plugins -or -path facebook/dependencies -or -path sledge/llvm -or -path sledge/.llvm_build \) -not -prune -or -type f -and -name '*'.ml -or -name '*'.mli 2>/dev/null) .PHONY: fmt_all fmt_all: - parallel $(OCAMLFORMAT_EXE) -i ::: $(SRC_ML) $(DUNE_ML) + parallel $(OCAMLFORMAT_EXE) $(OCAMLFORMAT_ARGS) -i ::: $(SRC_ML) $(DUNE_ML) # pre-building these avoids race conditions when building, eg src_build and test_build in parallel .PHONY: src_build_common