From 72c2a098ab53014b8a20d61babda0cce2338709d Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Fri, 1 Apr 2016 04:49:28 -0700 Subject: [PATCH] relative paths for infer and inferTraceBugs targets Summary:public This fixes the compilation of Infer from a path containing symbolic links. Reviewed By: jberdine Differential Revision: D3123244 fb-gh-sync-id: 09dbd13 fbshipit-source-id: 09dbd13 --- Makefile.config.in | 3 +++ Makefile.in | 2 +- infer/Makefile.in | 13 +++++++------ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Makefile.config.in b/Makefile.config.in index 51edebe65..2dc67c95b 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -38,6 +38,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 INFER_ANALYZERS= ifeq (@BUILD_C_ANALYZERS@,yes) diff --git a/Makefile.in b/Makefile.in index a79bad88a..857fbeb50 100644 --- a/Makefile.in +++ b/Makefile.in @@ -124,7 +124,7 @@ ifeq (@BUILD_JAVA_ANALYZERS@,yes) endif inferTraceBugs: - $(MAKE) -C $(INFER_DIR) $(INFERTRACEBUGS_BIN) + $(MAKE) -C $(INFER_DIR) $(INFERTRACEBUGS_BIN_RELPATH) inferTraceBugs_test: test_build ifeq (@BUILD_JAVA_ANALYZERS@,yes) diff --git a/infer/Makefile.in b/infer/Makefile.in index 8b73795c3..1009da1db 100644 --- a/infer/Makefile.in +++ b/infer/Makefile.in @@ -10,23 +10,24 @@ ROOT_DIR = .. include $(ROOT_DIR)/Makefile.config -all: clang java llvm $(INFER_BIN) $(INFERTRACEBUGS_BIN) checkCopyright +all: clang java llvm $(INFER_BIN_RELPATH) $(INFERTRACEBUGS_BIN_RELPATH) +all: checkCopyright -$(INFER_BIN) $(INFERTRACEBUGS_BIN): +$(INFER_BIN_RELPATH) $(INFERTRACEBUGS_BIN_RELPATH): ($(REMOVE) $@ && \ cd $(@D) && \ $(LN_S) ../lib/python/$(@F) $(@F)) -java: $(INFER_BIN) +java: $(INFER_BIN_RELPATH) $(MAKE) -C $(SRC_DIR) java $(MAKE) -C $(ANNOTATIONS_DIR) $(MAKE) -C $(MODELS_DIR) java -clang: $(INFER_BIN) +clang: $(INFER_BIN_RELPATH) $(MAKE) -C $(SRC_DIR) clang $(MAKE) -C $(MODELS_DIR) clang -llvm: $(INFER_BIN) +llvm: $(INFER_BIN_RELPATH) $(MAKE) -C $(SRC_DIR) llvm checkCopyright: @@ -36,6 +37,6 @@ clean: $(MAKE) -C $(SRC_DIR) clean $(MAKE) -C $(ANNOTATIONS_DIR) clean $(MAKE) -C $(MODELS_DIR) clean - $(REMOVE) $(INFER_BIN) $(INFERTRACEBUGS_BIN) + $(REMOVE) $(INFER_BIN_RELPATH) $(INFERTRACEBUGS_BIN_RELPATH) .PHONY: all checkCopyright clang clean java llvm models