diff --git a/.gitignore b/.gitignore index 62827a2de..fc0e52836 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,6 @@ _build /configure /Makefile.config /Makefile -/infer/Makefile /infer/models/Makefile /infer/models/c/Makefile /infer/models/cpp/Makefile diff --git a/Makefile.config.in b/Makefile.config.in index 7c88ae21d..1080719c0 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -40,9 +40,9 @@ INFERPRINT_BIN = $(BIN_DIR)/InferPrint INFERUNIT_BIN = $(BIN_DIR)/InferUnit INFER_BIN = $(BIN_DIR)/infer INFERTRACEBUGS_BIN = $(BIN_DIR)/inferTraceBugs -# paths relative to $(INFER_DIR) -INFER_BIN_RELPATH = bin/infer -INFERTRACEBUGS_BIN_RELPATH = bin/inferTraceBugs +# paths relative to $(ROOT_DIR) +INFER_BIN_RELPATH = infer/bin/infer +INFERTRACEBUGS_BIN_RELPATH = infer/bin/inferTraceBugs ifeq (@BUILD_JAVA_ANALYZERS@,yes) JAVA_HOME=@USER_JAVA_HOME@ diff --git a/Makefile.in b/Makefile.in index 79b5d7c52..5e5db9f79 100644 --- a/Makefile.in +++ b/Makefile.in @@ -31,8 +31,17 @@ TARGETS_TO_TEST := $(shell echo $(TARGETS_TO_TEST)) all: infer inferTraceBugs -infer: - $(MAKE) -C $(INFER_DIR) infer +$(INFER_BIN_RELPATH) $(INFERTRACEBUGS_BIN_RELPATH): + ($(REMOVE) $@ && \ + cd $(@D) && \ + $(LN_S) ../lib/python/$(@F) $(@F)) + +infer: $(INFER_BIN_RELPATH) + $(MAKE) -C $(SRC_DIR) infer +ifeq (@BUILD_JAVA_ANALYZERS@,yes) + $(MAKE) -C $(ANNOTATIONS_DIR) +endif + $(MAKE) -C $(MODELS_DIR) all ifeq (@BUILD_C_ANALYZERS@,yes) infer: clang_plugin @@ -63,6 +72,8 @@ ifeq (@IS_RELEASE_TREE@,no) CLANG_INCLUDES=@CLANG_INCLUDES@ endif +inferTraceBugs: $(INFERTRACEBUGS_BIN_RELPATH) + test_build: clang_plugin $(MAKE) -C $(SRC_DIR) test_build @@ -83,9 +94,6 @@ ifeq (@BUILD_JAVA_ANALYZERS@,yes) NO_BUCKD=1 ./infer/tests/build_systems/build_integration_tests.py endif -inferTraceBugs: - $(MAKE) -C $(INFER_DIR) $(INFERTRACEBUGS_BIN_RELPATH) - inferTraceBugs_test: infer $(INFER_BIN) -o __test-infer-out__ -- \ javac $(EXAMPLES_DIR)/Hello.java \ @@ -214,7 +222,10 @@ ifeq (@BUILD_C_ANALYZERS@,yes) $(MAKE) -C $(FCP_DIR)/clang-ocaml clean endif endif - $(MAKE) -C $(INFER_DIR) clean + $(MAKE) -C $(SRC_DIR) clean + $(MAKE) -C $(ANNOTATIONS_DIR) clean + $(MAKE) -C $(MODELS_DIR) clean + $(REMOVE) $(INFER_BIN_RELPATH) $(INFERTRACEBUGS_BIN_RELPATH) conf-clean: clean $(REMOVE) infer/lib/python/inferlib/*.pyc @@ -228,7 +239,6 @@ conf-clean: clean $(REMOVE) config.log $(REMOVE) config.status $(REMOVE) configure - $(REMOVE) infer/Makefile $(REMOVE) infer/models/Makefile $(REMOVE) infer/models/c/Makefile $(REMOVE_DIR) infer/models/c/out/ diff --git a/configure.ac b/configure.ac index 5c687abbf..e25a2b095 100644 --- a/configure.ac +++ b/configure.ac @@ -268,7 +268,6 @@ AC_SUBST([NCPU]) AC_CONFIG_FILES([ Makefile.config Makefile - infer/Makefile infer/models/Makefile infer/models/c/Makefile infer/models/cpp/Makefile diff --git a/infer/Makefile.in b/infer/Makefile.in deleted file mode 100644 index 4890ec7d1..000000000 --- a/infer/Makefile.in +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2015 - 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. - -@SET_MAKE@ -ROOT_DIR = .. - -include $(ROOT_DIR)/Makefile.config - -all: infer $(INFER_BIN_RELPATH) $(INFERTRACEBUGS_BIN_RELPATH) - -$(INFER_BIN_RELPATH) $(INFERTRACEBUGS_BIN_RELPATH): - ($(REMOVE) $@ && \ - cd $(@D) && \ - $(LN_S) ../lib/python/$(@F) $(@F)) - -infer: $(INFER_BIN_RELPATH) - $(MAKE) -C $(SRC_DIR) infer -ifeq (@BUILD_JAVA_ANALYZERS@,yes) - $(MAKE) -C $(ANNOTATIONS_DIR) -endif - $(MAKE) -C $(MODELS_DIR) all - -clean: - $(MAKE) -C $(SRC_DIR) clean - $(MAKE) -C $(ANNOTATIONS_DIR) clean - $(MAKE) -C $(MODELS_DIR) clean - $(REMOVE) $(INFER_BIN_RELPATH) $(INFERTRACEBUGS_BIN_RELPATH) - -.PHONY: all clean infer