From 4c6ae7d22d44ec63f3439735f1ba414ab6d5298f Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Fri, 1 Nov 2019 06:03:27 -0700 Subject: [PATCH] [ocamlformat] Deploy using dotslash Reviewed By: jvillard Differential Revision: D18128557 fbshipit-source-id: 83028fb59 --- .ocamlformat.hash | 1 - Makefile | 4 +--- Makefile.autoconf.in | 1 + configure.ac | 7 +++++++ 4 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 .ocamlformat.hash diff --git a/.ocamlformat.hash b/.ocamlformat.hash deleted file mode 100644 index 1eaca48e0..000000000 --- a/.ocamlformat.hash +++ /dev/null @@ -1 +0,0 @@ -9006560863e9323b8ee3e4d78fd0e799fe10259c diff --git a/Makefile b/Makefile index 265993aef..37952a1ef 100644 --- a/Makefile +++ b/Makefile @@ -210,8 +210,6 @@ fb-setup: $(QUIET)$(call silent_on_success,Facebook setup,\ $(MAKE) -C facebook setup) -OCAMLFORMAT_EXE?=ocamlformat - .PHONY: fmt fmt: parallel $(OCAMLFORMAT_EXE) -i ::: $$(git diff --name-only --diff-filter=ACMRU $$(git merge-base origin/master HEAD) | grep "\.mli\?$$") @@ -810,7 +808,7 @@ endif # This is a magical version number that doesn't reinstall the world when added on top of what we # have in opam.locked. To upgrade this version number, manually try to install several utop versions # until you find one that doesn't recompile the world. TODO(t20828442): get rid of magic -OPAM_DEV_DEPS = ocamlformat.$$(grep version .ocamlformat | cut -d ' ' -f 3) ocp-indent merlin utop.2.4.0 webbrowser +OPAM_DEV_DEPS = ocp-indent merlin utop.2.4.0 webbrowser ifneq ($(EMACS),no) OPAM_DEV_DEPS += tuareg diff --git a/Makefile.autoconf.in b/Makefile.autoconf.in index 1b79b224b..4b9dea773 100644 --- a/Makefile.autoconf.in +++ b/Makefile.autoconf.in @@ -62,6 +62,7 @@ NDKBUILD = @NDKBUILD@ OCAMLBUILD = @OCAMLBUILD@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ +OCAMLFORMAT_EXE = @OCAMLFORMAT@ OCAMLLEX = @OCAMLLEX@ OCAMLOPT = @OCAMLOPT@ OPAM = @OPAM@ diff --git a/configure.ac b/configure.ac index 7f28a6d5e..44d37b639 100644 --- a/configure.ac +++ b/configure.ac @@ -237,6 +237,13 @@ AC_ASSERT_OCAML_PKG([oUnit]) AC_CHECK_TOOL([UTOP], [utop], [no]) AC_ASSERT_OCAML_PKG([yojson]) +AC_MSG_CHECKING([which ocamlformat to use]) +AS_IF([test x"$is_facebook_tree" = x"yes"], + [OCAMLFORMAT="$(pwd)"/facebook/dependencies/bin/ocamlformat], + [OCAMLFORMAT=ocamlformat]) +AC_MSG_RESULT([$OCAMLFORMAT]) +AC_SUBST([OCAMLFORMAT]) + AC_ARG_VAR([CPATH], [Additional directories to search for C headers.]) AC_ARG_VAR([LIBRARY_PATH], [Additional directories to search for C shared objects.]) AC_ARG_VAR([CAML_LD_LIBRARY_PATH],