[make] make sure makefile uses config-time values

Summary:
This makes sure that one can run `./build-infer.sh` then `make`. Otherwise it's
not always clear what one should do to recompile infer, eg when `make` will
work and when `./build-infer.sh` should be used instead, in particular when the
user doesn't have opam configured for her terminal.

Reviewed By: jberdine

Differential Revision: D4698159

fbshipit-source-id: 5df8059
master
Jules Villard 8 years ago committed by Facebook Github Bot
parent 8d5be14e9c
commit dac8906d86

@ -89,7 +89,7 @@ all: infer
configure: configure.ac $(wildcard m4/*.m4)
./autogen.sh
Makefile.autoconf: configure
Makefile.autoconf: configure Makefile.autoconf.in
# rerun ./configure with the flags that were used last time it was run (if available)
./configure $(shell ./config.status --config || true)
@ -233,7 +233,7 @@ endtoend_test: print_direct_tests print_build_systems_tests
inferTraceBugs_test: infer
ifeq ($(BUILD_JAVA_ANALYZERS),yes)
$(INFER_BIN) -o __test-infer-out__ -- \
javac $(EXAMPLES_DIR)/Hello.java \
$(JAVAC) $(EXAMPLES_DIR)/Hello.java \
> /dev/null
else
$(INFER_BIN) -o __test-infer-out__ -- \

@ -13,6 +13,7 @@ bindir = @bindir@
BUCK = @BUCK@
BUILD_C_ANALYZERS = @BUILD_C_ANALYZERS@
BUILD_JAVA_ANALYZERS = @BUILD_JAVA_ANALYZERS@
CAML_LD_LIBRARY_PATH = @CAML_LD_LIBRARY_PATH@
CC = @CC@
CFLAGS = @CFLAGS@
CLANG_INCLUDES = @CLANG_INCLUDES@
@ -32,9 +33,11 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
IS_FACEBOOK_TREE = @IS_FACEBOOK_TREE@
IS_RELEASE_TREE = @IS_RELEASE_TREE@
JAVAC = @JAVAC@
LDFLAGS = @LDFLAGS@
libdir = @libdir@
LIBS = @LIBS@
MENHIR = @MENHIR@
MKDIR_P_CMD = case "@MKDIR_P@" in \
./*) printf "$(ROOT_DIR)/@MKDIR_P@\n";; \
*) printf "@MKDIR_P@\n";; \
@ -43,8 +46,12 @@ MKDIR_P = $(shell $(MKDIR_P_CMD))
MVN = @MVN@
NCPU = @NCPU@
NDKBUILD = @NDKBUILD@
OCAMLC = @OCAMLC@
OCAMLLEX = @OCAMLLEX@
OCAMLOPT = @OCAMLOPT@
prefix = @prefix@
PYTHON_lxml = @PYTHON_lxml@
REBUILD = @REBUILD@
USER_JAVA_HOME = @USER_JAVA_HOME@
XCODE_SELECT = @XCODE_SELECT@
XCPRETTY = @XCPRETTY@
@ -55,3 +62,10 @@ LN_S = @LN_S@
else
LN_S = @LN_S@ -v
endif
# Export parts of the config relevant to the compilation (taken from `opam config env`) in case the
# user runs `./configure` in some configuration but `make` in another.
export PATH := $(shell cd "$(dir $(REBUILD))" && pwd):$(PATH)
ifneq ($(CAML_LD_LIBRARY_PATH),)
export CAML_LD_LIBRARY_PATH := $(CAML_LD_LIBRARY_PATH)
endif

@ -94,7 +94,7 @@ AS_IF([test "x$enable_c_analyzers" = "xyes"], [
AC_CHECK_TOOL([SHASUM], [shasum], [no])
AC_ASSERT_PROG([shasum], [$SHASUM])
# cmake is required to build llvm+clang
AC_CHECK_TOOL([CMAKE], [cmake], [no])
AC_PATH_TOOL([CMAKE], [cmake], [no])
AS_IF([test "x$is_release_tree" = "xno"], [
AC_ASSERT_PROG([cmake], [$CMAKE])
])
@ -111,7 +111,7 @@ AS_IF([test "x$enable_c_analyzers" = "xyes"], [
AC_CHECK_TOOL([PYTHON27], [python2.7], [no])
AC_ASSERT_PROG([python2.7], [$PYTHON27])
AC_CHECK_TOOL([XCODE_SELECT], [xcode-select], [no])
AC_PATH_TOOL([XCODE_SELECT], [xcode-select], [no])
# prefer clang over gcc because the plugins makes use of
@ -174,8 +174,8 @@ AC_ASSERT_PROG([ocamlbuild], [$OCAMLBUILD])
AC_PROG_FINDLIB
AC_PROG_OCAMLLEX
AC_ASSERT_PROG([ocamllex], [$OCAMLLEX])
AC_PROG_OCAMLYACC
AC_ASSERT_PROG([ocamlyacc], [$OCAMLYACC])
AC_PATH_TOOL([MENHIR], [menhir], [no])
AC_ASSERT_PROG([menhir], [$MENHIR])
AC_ASSERT_OCAML_PKG([atdgen], [], [1.6.0])
AC_ASSERT_OCAML_PKG([biniou])
AC_ASSERT_OCAML_PKG([camlzip], [zip])
@ -185,12 +185,15 @@ AC_ASSERT_OCAML_PKG([reason])
AC_ASSERT_OCAML_PKG([yojson])
# check for rebuild after checking for Reason since `rebuild` is normally provided by Reason. This
# way if Reason is missing we get a more helpful error message and not "rebuild not found".
AC_CHECK_TOOL([REBUILD], [rebuild], [no])
AC_PATH_TOOL([REBUILD], [rebuild], [no])
AC_ASSERT_PROG([rebuild], [$REBUILD])
AC_ARG_VAR([CAML_LD_LIBRARY_PATH],
[Additional directories to search for dynamically-loaded libraries.])
if test "x$enable_java_analyzers" = "xyes"; then
AC_CHECK_TOOL([JAVA], [java], [no])
AC_CHECK_TOOL([JAVAC], [javac], [no])
AC_PATH_TOOL([JAVAC], [javac], [no])
AC_ASSERT_PROG([javac], [$JAVAC])
AC_ASSERT_PROG([java], [$JAVA])
AC_ASSERT_OCAML_PKG([javalib], [], [2.3.3])
@ -224,7 +227,7 @@ _ACEOF
fi
AC_CHECK_TOOL([ATDGEN], [atdgen], [no])
AC_PATH_TOOL([ATDGEN], [atdgen], [no])
AC_ASSERT_PROG([atdgen], [$ATDGEN])
AC_ARG_ENABLE(ocaml-bin-annot,
@ -247,11 +250,11 @@ echo $buck_version > "$buckversion_file"
AC_MSG_RESULT([$buck_version])
AC_CHECK_TOOL([GETCONF], [getconf], [no])
AC_PATH_TOOL([GETCONF], [getconf], [no])
AC_MSG_CHECKING([the number of cpus the build host has])
if test "$GETCONF" != "no"; then
if test $(getconf _NPROCESSORS_ONLN); then
NCPU=$(getconf _NPROCESSORS_ONLN)
if test $("$GETCONF" _NPROCESSORS_ONLN); then
NCPU=$("$GETCONF" _NPROCESSORS_ONLN)
AC_MSG_RESULT([$NCPU])
fi
else
@ -262,20 +265,20 @@ AC_SUBST([NCPU])
# optional progs and libraries that, eg build systems to be run in integration tests
AC_CHECK_TOOL([ANT], [ant], [no])
AC_PATH_TOOL([ANT], [ant], [no])
if test ! -z "$SANDCASTLE"; then
BUCK=buck
AC_SUBST([BUCK])
else
AC_CHECK_TOOL([BUCK], [buck], [no])
AC_PATH_TOOL([BUCK], [buck], [no])
fi
AC_ARG_VAR([MVN], [command to execute Maven when running tests])
AS_IF([test "x$MVN" = "x"], [
AC_CHECK_TOOL([MVN], [mvn], [no])
AC_PATH_TOOL([MVN], [mvn], [no])
], [
AC_MSG_RESULT([checking for mvn... $MVN])
])
AC_CHECK_TOOL([NDKBUILD], [ndk-build], [no])
AC_PATH_TOOL([NDKBUILD], [ndk-build], [no])
if test x"$NDKBUILD" = x"no"; then
# ndk-build not in $PATH, look into potential android NDK install paths and record the absolute path
# to ndk-build
@ -285,7 +288,7 @@ fi
AC_CHECK_PYTHON_MODULE([$PYTHON27], [lxml])
AC_CHECK_TOOL([XCPRETTY], [xcpretty], [no])
AC_PATH_TOOL([XCPRETTY], [xcpretty], [no])
BREW=no
if which brew > /dev/null; then

@ -20,14 +20,14 @@ SOURCES_JAR = $(CWD)/annotations-src.jar
all: $(ANNOTATIONS_JAR) $(SOURCES_JAR)
$(ANNOTATIONS_JAR): $(ANNOT_SOURCES)
mkdir -p $(ANNOT_CLASSES)
javac -source 7 -target 7 -cp $(JSR_JAR) $(ANNOT_SOURCES) -d $(ANNOT_CLASSES)
$(MKDIR_P) $(ANNOT_CLASSES)
$(JAVAC) -source 7 -target 7 -cp $(JSR_JAR) $(ANNOT_SOURCES) -d $(ANNOT_CLASSES)
cd $(ANNOT_CLASSES) && jar cvf $(ANNOTATIONS_JAR) com
$(SOURCES_JAR): $(ANNOT_SOURCES)
jar cvf $(SOURCES_JAR) $(SOURCES_DIR)/com
clean:
@rm -rf $(ANNOT_CLASSES)
@rm -f $(ANNOTATIONS_JAR)
@rm -f $(SOURCES_JAR)
@$(REMOVE_DIR) $(ANNOT_CLASSES)
@$(REMOVE) $(ANNOTATIONS_JAR)
@$(REMOVE) $(SOURCES_JAR)

@ -25,7 +25,7 @@ clean:
@rm -f $(JAVA_MODELS_JAR)
compile:
javac -bootclasspath $(ANDROID_JAR) -d $(MODELS_OUT) -classpath $(MODELS_CLASSPATH) $(JAVA_SOURCES)
$(JAVAC) -bootclasspath $(ANDROID_JAR) -d $(MODELS_OUT) -classpath $(MODELS_CLASSPATH) $(JAVA_SOURCES)
$(INFER_REPORT): $(JAVA_DEPS_NO_MODELS) $(JAVA_SOURCES)
@rm -fr $(MODELS_OUT)
@ -33,7 +33,7 @@ $(INFER_REPORT): $(JAVA_DEPS_NO_MODELS) $(JAVA_SOURCES)
@rm -f $(JAVA_MODELS_JAR)
$(call silent_on_success,\
$(INFER_BIN) --jobs 1 --results-dir $(INFER_RESULTS_DIR) --models-mode -- \
javac -bootclasspath $(ANDROID_JAR) -d $(MODELS_OUT) -classpath $(MODELS_CLASSPATH) \
$(JAVAC) -bootclasspath $(ANDROID_JAR) -d $(MODELS_OUT) -classpath $(MODELS_CLASSPATH) \
$(JAVA_SOURCES))
$(MODELS_JAR): $(INFER_REPORT)

@ -1,8 +1,18 @@
# Copyright (c) 2017 - present Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
ROOT_DIR = ../../../..
include $(ROOT_DIR)/Makefile.config
M_SOURCES=$(shell find . -name "*.m")
C_SOURCES=$(shell find . -name "*.c")
OBJECTS=$(M_SOURCES:.m=.o) $(C_SOURCES:.c=.o)
CC=clang
XCODE_PATH=$(shell xcode-select -p)
XCODE_PATH=$(shell $(XCODE_SELECT) -p)
IPHONE_SIMULATOR_PATH=$(XCODE_PATH)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
CFLAGS=--target=x86_64-apple-darwin14 -x objective-c -c -mios-simulator-version-min=8.2 -isysroot $(IPHONE_SIMULATOR_PATH)

@ -22,7 +22,7 @@ OCAML_FATAL_WARNINGS = +3+5+6+8+10+11+12+18+19+20+23+26+29+27+33+34+35+37+38+39+
# Notice that use-ocamlfind is used here to avoid a linker bug in ocamlbuild when using -tag thread
OCAMLBUILD_OPTIONS = \
-r \
-use-menhir -menhir 'menhir --explain --strict'\
-use-menhir -menhir '$(MENHIR) --explain --strict'\
-use-ocamlfind \
-lflags -cclib,-lffi \
-cflags -g -lflags -g \
@ -124,7 +124,7 @@ endif
DEPENDENCIES = IR backend base checkers eradicate harness integration tp/fts quandary bufferoverrun $(EXTRA_DEPS)
# ocamlbuild command with options common to all build targets
OCAMLBUILD_BASE = rebuild $(OCAMLBUILD_OPTIONS) -j $(NCPU) $(addprefix -I , $(DEPENDENCIES))
OCAMLBUILD_BASE = $(REBUILD) $(OCAMLBUILD_OPTIONS) -j $(NCPU) $(addprefix -I , $(DEPENDENCIES))
# ocamlbuild with options necessary to build all targets at once, regardless of configure flags
OCAMLBUILD_ALL = $(OCAMLBUILD_BASE) $(JAVA_OCAMLBUILD_OPTIONS)
@ -166,7 +166,7 @@ OCAML_CONFIG_SOURCES += $(CLANG_ATDGEN_STUBS) $(INFER_CLANG_FCP_MIRRORED_FILES)
endif
OCAML_ALL_SOURCES = $(OCAML_BASE_SOURCES) $(CLANG_ATDGEN_STUBS) $(INFER_CLANG_FCP_MIRRORED_FILES)
export OCAMLFIND_IGNORE_DUPS_IN=$(shell ocamlc -where)/compiler-libs
export OCAMLFIND_IGNORE_DUPS_IN=$(shell $(OCAMLC) -where)/compiler-libs
.PHONY: all
all: infer
@ -243,10 +243,10 @@ test_build: $(TEST_BUILD_DIR)/$(INFER_MAIN).byte
# to generate interface file.mli from implementation file.ml execute:
# make M=file mli
mli:
ocamlfind ocamlc -package atdgen,oUnit,str,unix,yojson,zip $(addprefix -I $(INFER_BUILD_DIR),$(DEPENDENCIES)) -i $(M).ml > $(M).mli
$(OCAMLFIND) ocamlc -package atdgen,oUnit,str,unix,yojson,zip $(addprefix -I $(INFER_BUILD_DIR),$(DEPENDENCIES)) -i $(M).ml > $(M).mli
rei:
ocamlfind ocamlc -package atdgen,oUnit,str,unix,yojson,zip $(addprefix -I $(INFER_BUILD_DIR),$(DEPENDENCIES)) -i -pp refmt -impl $(M).re > $(M).rei
$(OCAMLFIND) ocamlc -package atdgen,oUnit,str,unix,yojson,zip $(addprefix -I $(INFER_BUILD_DIR),$(DEPENDENCIES)) -i -pp refmt -impl $(M).re > $(M).rei
# convert to reason
%.re : %.ml
@ -313,7 +313,7 @@ toplevel: $(INFER_BUILD_DIR)/toplevel.cmo
checkCopyright: $(CHECKCOPYRIGHT_BIN)
$(CHECKCOPYRIGHT_BIN): $(BUILD_DIR) $(CHECKCOPYRIGHT_MAIN).ml Makefile
rebuild -quiet -r -j $(NCPU) -build-dir $(BUILD_DIR)/checkCopyright \
$(REBUILD) -quiet -r -j $(NCPU) -build-dir $(BUILD_DIR)/checkCopyright \
-cflags -g,-safe-string -lflags -g \
-pkgs core,str -tag thread -use-ocamlfind $(CHECKCOPYRIGHT_MAIN).native
$(INSTALL_PROGRAM) \

@ -16,11 +16,11 @@ include $(TESTS_DIR)/java.make
include $(TESTS_DIR)/base.make
$(OBJECTS): $(SOURCES)
ant
$(ANT)
infer-out/report.json: $(JAVA_DEPS) $(SOURCES)
$(call silent_on_success,\
$(INFER_BIN) -a $(ANALYZER) --project-root $(TESTS_DIR) --inferconfig-home . -- ant)
$(INFER_BIN) -a $(ANALYZER) --project-root $(TESTS_DIR) --inferconfig-home . -- $(ANT))
clean:
ant clean
$(ANT) clean

@ -22,7 +22,7 @@ $(OBJECTS): $(JAVA_SOURCE_FILES)
cd $(ROOT_DIR) && \
$(call silent_on_success,\
INFER_BIN=$(INFER_BIN) NO_BUCKD=1 \
buck build --no-cache $(BUCK_TARGET))
$(BUCK) build --no-cache $(BUCK_TARGET))
infer-out/report.json: $(JAVA_DEPS) $(JAVA_SOURCE_FILES)
cd $(ROOT_DIR) && \
@ -30,4 +30,4 @@ infer-out/report.json: $(JAVA_DEPS) $(JAVA_SOURCE_FILES)
$(call silent_on_success,\
INFER_BIN=$(INFER_BIN) NO_BUCKD=1 \
$(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/infer-out -- \
buck build --no-cache $(BUCK_TARGET))
$(BUCK) build --no-cache $(BUCK_TARGET))

@ -18,9 +18,9 @@ $(CURRENT_REPORT): .inferconfig
cp src/DiffExampleTwo.java.current src/DiffExampleTwo.java
$(call silent_on_success,\
$(INFER_BIN) \
-o $(CURRENT_DIR) -- javac src/com/example/DiffExample.java src/DiffExampleTwo.java)
-o $(CURRENT_DIR) -- $(JAVAC) src/com/example/DiffExample.java src/DiffExampleTwo.java)
$(PREVIOUS_REPORT): .inferconfig
cp src/com/example/DiffExample.java.previous src/com/example/DiffExample.java
$(call silent_on_success,\
$(INFER_BIN) -o $(PREVIOUS_DIR) -- javac src/com/example/DiffExample.java)
$(INFER_BIN) -o $(PREVIOUS_DIR) -- $(JAVAC) src/com/example/DiffExample.java)

@ -14,8 +14,8 @@ include ../../differential.make
$(CURRENT_REPORT):
cp src/DiffExample.java.current src/DiffExample.java
$(call silent_on_success, $(INFER_BIN) -o $(CURRENT_DIR) -- javac src/*.java)
$(call silent_on_success, $(INFER_BIN) -o $(CURRENT_DIR) -- $(JAVAC) src/*.java)
$(PREVIOUS_REPORT):
cp src/DiffExample.java.previous src/DiffExample.java
$(call silent_on_success, $(INFER_BIN) -o $(PREVIOUS_DIR) -- javac src/*.java)
$(call silent_on_success, $(INFER_BIN) -o $(PREVIOUS_DIR) -- $(JAVAC) src/*.java)

@ -16,9 +16,9 @@ $(CURRENT_REPORT):
cp src/DiffExample.java.current src/DiffExample.java
cp src/DiffExampleTwo.java.current src/DiffExampleTwo.java
$(call silent_on_success,\
$(INFER_BIN) -o $(CURRENT_DIR) -- javac src/DiffExample.java src/DiffExampleTwo.java)
$(INFER_BIN) -o $(CURRENT_DIR) -- $(JAVAC) src/DiffExample.java src/DiffExampleTwo.java)
$(PREVIOUS_REPORT):
cp src/DiffExample.java.previous src/DiffExample.java
$(call silent_on_success,\
$(INFER_BIN) -o $(PREVIOUS_DIR) -- javac src/DiffExample.java)
$(INFER_BIN) -o $(PREVIOUS_DIR) -- $(JAVAC) src/DiffExample.java)

@ -16,9 +16,9 @@ include ../../differential.make
$(CURRENT_REPORT):
cp src/DiffExampleRenamed.java.current src/DiffExampleRenamed.java
$(call silent_on_success,\
$(INFER_BIN) -o $(CURRENT_DIR) -- javac src/DiffExampleRenamed.java)
$(INFER_BIN) -o $(CURRENT_DIR) -- $(JAVAC) src/DiffExampleRenamed.java)
$(PREVIOUS_REPORT):
cp src/DiffExample.java.previous src/DiffExample.java
$(call silent_on_success,\
$(INFER_BIN) -o $(PREVIOUS_DIR) -- javac src/DiffExample.java)
$(INFER_BIN) -o $(PREVIOUS_DIR) -- $(JAVAC) src/DiffExample.java)

@ -24,7 +24,7 @@ include $(TESTS_DIR)/base.make
$(OBJECTS): $(JAVA_SOURCE_FILES)
cd $(ROOT_DIR) && \
$(call silent_on_success,\
NO_BUCKD=1 buck build --no-cache $(BUCK_TARGET))
NO_BUCKD=1 $(BUCK) build --no-cache $(BUCK_TARGET))
.PHONY: genrule
genrule: $(JSON_REPORT)
@ -35,7 +35,7 @@ $(JSON_REPORT): $(JAVA_DEPS) $(JAVA_SOURCE_FILES)
$(REMOVE_DIR) buck-out && \
$(call silent_on_success,\
INFER_BIN="$(INFER_BIN)" NO_BUCKD=1 GENERATE_INFER_GENRULES=1 \
buck build --no-cache $(INFER_TARGET))
$(BUCK) build --no-cache $(INFER_TARGET))
touch $@
infer-out/report.json: $(JSON_REPORT)

@ -85,7 +85,7 @@ infer-out-javac/report.json: $(JAVA_DEPS) $(JAVAC_DIR)
cd $(JAVAC_DIR) && \
$(call silent_on_success,\
$(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/$(@D) -- \
javac -cp $(CLASSPATH) $(foreach source,$(JAVAC_SOURCES),$(notdir $(source))))
$(JAVAC) -cp $(CLASSPATH) $(foreach source,$(JAVAC_SOURCES),$(notdir $(source))))
infer-out-make/report.json: $(CLANG_DEPS) $(MAKE_DIR)
cd $(MAKE_DIR) && \

@ -19,13 +19,13 @@ EXP_TESTs = $(sort $(patsubst %.java,%.exp.test.noreplace,$(SOURCES)))
INFER_OUTs = $(patsubst %.java,infer-out-%,$(SOURCES))
$(OBJECTS): $(SOURCES)
javac -cp $(CLASSPATH) $(SOURCES)
$(JAVAC) -cp $(CLASSPATH) $(SOURCES)
# analyze a single source file and generate the test results for it
%.exp.test.noreplace: $(JAVA_DEPS) %.stacktrace.json %.java
$(call silent_on_success,\
$(INFER_BIN) -a $(ANALYZER) -o infer-out-$* --stacktrace $*.stacktrace.json \
-- javac -cp $(CLASSPATH) $*.java)
-- $(JAVAC) -cp $(CLASSPATH) $*.java)
# add a newline at the end of the json when creating the exp.test
$(COPY) infer-out-$*/crashcontext/crashcontext.json $@ && echo >> $@

@ -9,7 +9,7 @@ TESTS_DIR = ../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = /Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
XCODEROOT = $(shell xcode-select -p)
XCODEROOT = $(shell $(XCODE_SELECT) -p)
ANALYZER = infer
CLANG_OPTIONS = -x objective-c \

@ -10,7 +10,7 @@ TESTS_DIR = ../../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = \
/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
XCODEROOT = $(shell xcode-select -p)
XCODEROOT = $(shell $(XCODE_SELECT) -p)
CLANG_OPTIONS = -x objective-c \
-isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \

@ -10,7 +10,7 @@ TESTS_DIR = ../../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = \
/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
XCODEROOT = $(shell xcode-select -p)
XCODEROOT = $(shell $(XCODE_SELECT) -p)
CLANG_OPTIONS = -x objective-c \
-isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \

@ -9,7 +9,7 @@ TESTS_DIR = ../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = /Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
XCODEROOT = $(shell xcode-select -p)
XCODEROOT = $(shell $(XCODE_SELECT) -p)
CLANG_OPTIONS = -x objective-c \
-isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \

@ -9,7 +9,7 @@ TESTS_DIR = ../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = /Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
XCODEROOT = $(shell xcode-select -p)
XCODEROOT = $(shell $(XCODE_SELECT) -p)
CLANG_OPTIONS = -x objective-c \
-isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \

@ -9,7 +9,7 @@ TESTS_DIR=../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = /Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
XCODEROOT = $(shell xcode-select -p)
XCODEROOT = $(shell $(XCODE_SELECT) -p)
CLANG_OPTIONS = -x objective-c++ -std=c++11 \
-isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \

@ -20,9 +20,9 @@ include $(TESTS_DIR)/base.make
PROJECT_ROOT ?= $(TESTS_DIR)
$(OBJECTS): $(SOURCES)
javac -cp $(CLASSPATH) $(SOURCES)
$(JAVAC) -cp $(CLASSPATH) $(SOURCES)
infer-out/report.json: $(JAVA_DEPS) $(SOURCES)
$(call silent_on_success,\
$(INFER_BIN) -a $(ANALYZER) --inferconfig-home . --project-root $(PROJECT_ROOT) $(INFER_OPTIONS) -- \
javac -cp $(CLASSPATH) $(SOURCES))
$(JAVAC) -cp $(CLASSPATH) $(SOURCES))

@ -37,7 +37,7 @@ dnl For documentation, please read the ocaml.m4 man page.
AC_DEFUN([AC_PROG_OCAML],
[dnl
# checking for ocamlc
AC_CHECK_TOOL([OCAMLC],[ocamlc],[no])
AC_PATH_TOOL([OCAMLC],[ocamlc],[no])
if test "$OCAMLC" != "no"; then
OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'`
@ -54,7 +54,7 @@ AC_DEFUN([AC_PROG_OCAML],
AC_SUBST([OCAMLLIB])
# checking for ocamlopt
AC_CHECK_TOOL([OCAMLOPT],[ocamlopt],[no])
AC_PATH_TOOL([OCAMLOPT],[ocamlopt],[no])
OCAMLBEST=byte
if test "$OCAMLOPT" = "no"; then
AC_MSG_WARN([Cannot find ocamlopt; bytecode compilation only.])
@ -71,7 +71,7 @@ AC_DEFUN([AC_PROG_OCAML],
AC_SUBST([OCAMLBEST])
# checking for ocamlc.opt
AC_CHECK_TOOL([OCAMLCDOTOPT],[ocamlc.opt],[no])
AC_PATH_TOOL([OCAMLCDOTOPT],[ocamlc.opt],[no])
if test "$OCAMLCDOTOPT" != "no"; then
TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
@ -83,7 +83,7 @@ AC_DEFUN([AC_PROG_OCAML],
# checking for ocamlopt.opt
if test "$OCAMLOPT" != "no" ; then
AC_CHECK_TOOL([OCAMLOPTDOTOPT],[ocamlopt.opt],[no])
AC_PATH_TOOL([OCAMLOPTDOTOPT],[ocamlopt.opt],[no])
if test "$OCAMLOPTDOTOPT" != "no"; then
TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
@ -112,31 +112,31 @@ AC_DEFUN([AC_PROG_OCAML],
AC_SUBST([OCAMLNATDYNLINK])
# checking for ocaml toplevel
AC_CHECK_TOOL([OCAML],[ocaml],[no])
AC_PATH_TOOL([OCAML],[ocaml],[no])
# checking for ocamldep
AC_CHECK_TOOL([OCAMLDEP],[ocamldep],[no])
AC_PATH_TOOL([OCAMLDEP],[ocamldep],[no])
# checking for ocamlmktop
AC_CHECK_TOOL([OCAMLMKTOP],[ocamlmktop],[no])
AC_PATH_TOOL([OCAMLMKTOP],[ocamlmktop],[no])
# checking for ocamlmklib
AC_CHECK_TOOL([OCAMLMKLIB],[ocamlmklib],[no])
AC_PATH_TOOL([OCAMLMKLIB],[ocamlmklib],[no])
# checking for ocamldoc
AC_CHECK_TOOL([OCAMLDOC],[ocamldoc],[no])
AC_PATH_TOOL([OCAMLDOC],[ocamldoc],[no])
# checking for ocamlbuild
AC_CHECK_TOOL([OCAMLBUILD],[ocamlbuild],[no])
AC_PATH_TOOL([OCAMLBUILD],[ocamlbuild],[no])
])
AC_DEFUN([AC_PROG_OCAMLLEX],
[dnl
# checking for ocamllex
AC_CHECK_TOOL([OCAMLLEX],[ocamllex],[no])
AC_PATH_TOOL([OCAMLLEX],[ocamllex],[no])
if test "$OCAMLLEX" != "no"; then
AC_CHECK_TOOL([OCAMLLEXDOTOPT],[ocamllex.opt],[no])
AC_PATH_TOOL([OCAMLLEXDOTOPT],[ocamllex.opt],[no])
if test "$OCAMLLEXDOTOPT" != "no"; then
OCAMLLEX=$OCAMLLEXDOTOPT
fi
@ -146,7 +146,7 @@ AC_DEFUN([AC_PROG_OCAMLLEX],
AC_DEFUN([AC_PROG_OCAMLYACC],
[dnl
AC_CHECK_TOOL([OCAMLYACC],[ocamlyacc],[no])
AC_PATH_TOOL([OCAMLYACC],[ocamlyacc],[no])
AC_SUBST([OCAMLYACC])
])
@ -156,7 +156,7 @@ AC_DEFUN([AC_PROG_CAMLP4],
AC_REQUIRE([AC_PROG_OCAML])dnl
# checking for camlp4
AC_CHECK_TOOL([CAMLP4],[camlp4],[no])
AC_PATH_TOOL([CAMLP4],[camlp4],[no])
if test "$CAMLP4" != "no"; then
TMPVERSION=`$CAMLP4 -v 2>&1| sed -n -e 's|.*version *\(.*\)$|\1|p'`
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
@ -167,14 +167,14 @@ AC_DEFUN([AC_PROG_CAMLP4],
AC_SUBST([CAMLP4])
# checking for companion tools
AC_CHECK_TOOL([CAMLP4BOOT],[camlp4boot],[no])
AC_CHECK_TOOL([CAMLP4O],[camlp4o],[no])
AC_CHECK_TOOL([CAMLP4OF],[camlp4of],[no])
AC_CHECK_TOOL([CAMLP4OOF],[camlp4oof],[no])
AC_CHECK_TOOL([CAMLP4ORF],[camlp4orf],[no])
AC_CHECK_TOOL([CAMLP4PROF],[camlp4prof],[no])
AC_CHECK_TOOL([CAMLP4R],[camlp4r],[no])
AC_CHECK_TOOL([CAMLP4RF],[camlp4rf],[no])
AC_PATH_TOOL([CAMLP4BOOT],[camlp4boot],[no])
AC_PATH_TOOL([CAMLP4O],[camlp4o],[no])
AC_PATH_TOOL([CAMLP4OF],[camlp4of],[no])
AC_PATH_TOOL([CAMLP4OOF],[camlp4oof],[no])
AC_PATH_TOOL([CAMLP4ORF],[camlp4orf],[no])
AC_PATH_TOOL([CAMLP4PROF],[camlp4prof],[no])
AC_PATH_TOOL([CAMLP4R],[camlp4r],[no])
AC_PATH_TOOL([CAMLP4RF],[camlp4rf],[no])
AC_SUBST([CAMLP4BOOT])
AC_SUBST([CAMLP4O])
AC_SUBST([CAMLP4OF])
@ -191,7 +191,7 @@ AC_DEFUN([AC_PROG_FINDLIB],
AC_REQUIRE([AC_PROG_OCAML])dnl
# checking for ocamlfind
AC_CHECK_TOOL([OCAMLFIND],[ocamlfind],[no])
AC_PATH_TOOL([OCAMLFIND],[ocamlfind],[no])
AC_SUBST([OCAMLFIND])
])

Loading…
Cancel
Save