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
master
Jules Villard 9 years ago committed by Facebook Github Bot 9
parent c986e65507
commit 72c2a098ab

@ -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)

@ -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)

@ -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

Loading…
Cancel
Save