From 20b198b7279328cea65d5cf5714b0b15e5b178fd Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Thu, 19 Oct 2017 03:06:28 -0700 Subject: [PATCH] [make] do not install tuareg if emacs is not found Summary: Tuareg is only useful for emacs, and `opam install tuareg` fails if emacs is not found. Reviewed By: mbouaziz Differential Revision: D6098693 fbshipit-source-id: 167628a --- Makefile | 6 +++++- Makefile.autoconf.in | 1 + configure.ac | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3f5e66e71..09b8db201 100644 --- a/Makefile +++ b/Makefile @@ -572,7 +572,11 @@ opam.lock: opam # This is a magical version number that doesn't reinstall the world when added on top of what we # have in opam.lock. 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 = ocp-indent merlin tuareg utop.2.0.1 +OPAM_DEV_DEPS = ocp-indent merlin utop.2.0.1 + +ifneq ($(EMACS),no) +OPAM_DEV_DEPS += tuareg +endif .PHONY: devsetup devsetup: Makefile.autoconf diff --git a/Makefile.autoconf.in b/Makefile.autoconf.in index 422d95f75..8d4c48f4e 100644 --- a/Makefile.autoconf.in +++ b/Makefile.autoconf.in @@ -25,6 +25,7 @@ CXX = @CXX@ CXXFLAGS = @CXXFLAGS@ # this is useless but autoconf is picky... datarootdir = @datarootdir@ +EMACS = @EMACS@ ENABLE_OCAMLOPT_CUSTOM_CC = @ENABLE_OCAMLOPT_CUSTOM_CC@ ENABLE_OCAML_BINANNOT = @ENABLE_OCAML_BINANNOT@ exec_prefix = @exec_prefix@ diff --git a/configure.ac b/configure.ac index 22d365f7a..0274cefdf 100644 --- a/configure.ac +++ b/configure.ac @@ -289,6 +289,7 @@ AC_SUBST([NCPU]) AC_CHECK_TOOL([ANT], [ant], [no]) AC_CHECK_TOOL([BUCK], [buck], [no]) +AC_CHECK_TOOL([EMACS], [emacs], [no]) AC_ARG_VAR([MVN], [command to execute Maven when running tests]) AS_IF([test "x$MVN" = "x"], [ AC_CHECK_TOOL([MVN], [mvn], [no])