From 4e8008baf29279173c7bf8e010c369240bc15d98 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Fri, 19 Feb 2016 06:52:31 -0800 Subject: [PATCH] Simplify setting ocamlbuild options Summary: public Reviewed By: jvillard Differential Revision: D2953039 fb-gh-sync-id: bc4366d shipit-source-id: bc4366d --- infer/src/Makefile.in | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/infer/src/Makefile.in b/infer/src/Makefile.in index 022ac4da0..5a5ff3b4d 100644 --- a/infer/src/Makefile.in +++ b/infer/src/Makefile.in @@ -38,25 +38,7 @@ ETC_DIR = $(INFER_DIR)/etc #### ocamlbuild options #### -OCAMLBUILD_ANNOT_OPTIONS = -ifeq (@ENABLE_OCAML_ANNOT@,yes) -OCAMLBUILD_ANNOT_OPTIONS = -cflags -annot -endif - -OCAMLBUILD_BINANNOT_OPTIONS = -ifeq (@ENABLE_OCAML_BINANNOT@,yes) -OCAMLBUILD_BINANNOT_OPTIONS = -cflags -bin-annot -endif - -OCAMLBUILD_QUIET_OPTIONS = -ifneq (,$(findstring s,$(MAKEFLAGS))) -OCAMLBUILD_QUIET_OPTIONS = -quiet -endif - OCAMLBUILD_OPTIONS = \ - $(OCAMLBUILD_ANNOT_OPTIONS) \ - $(OCAMLBUILD_BINANNOT_OPTIONS) \ - $(OCAMLBUILD_QUIET_OPTIONS) \ -classic-display \ -cflags -short-paths \ -cflags -safe-string \ @@ -87,6 +69,18 @@ OCAMLBUILD_OPTIONS = \ -tag-line "not <**/{config,iList,utils}.*>: open(Utils)" \ -pkgs atdgen,extlib,str,unix,yojson,zip +ifeq (@ENABLE_OCAML_ANNOT@,yes) +OCAMLBUILD_OPTIONS += -cflags -annot +endif + +ifeq (@ENABLE_OCAML_BINANNOT@,yes) +OCAMLBUILD_OPTIONS += -cflags -bin-annot +endif + +ifneq (,$(findstring s,$(MAKEFLAGS))) +OCAMLBUILD_OPTIONS += -quiet +endif + #### Backend declarations #### BACKEND_SOURCES = backend