create infer/bin/ symlinks from the makefile

Summary:public
This is needed to have a working `opam install infer`. Actual working `opam
install infer` in a follow-up diff.

Reviewed By: jberdine

Differential Revision: D3109308

fb-gh-sync-id: 49d7276
fbshipit-source-id: 49d7276
master
Jules Villard 9 years ago committed by Facebook Github Bot 1
parent 9f10b09688
commit f0512bcd91

2
.gitignore vendored

@ -75,6 +75,8 @@ buck-out/
/infer/bin/InferPrint /infer/bin/InferPrint
/infer/bin/InferUnit /infer/bin/InferUnit
/infer/bin/Typeprop /infer/bin/Typeprop
/infer/bin/infer
/infer/bin/inferTraceBugs
/infer/src/backend/version.ml /infer/src/backend/version.ml
/infer/models/java/models/ /infer/models/java/models/
/infer/models/java/models.jar /infer/models/java/models.jar

@ -36,6 +36,8 @@ INFERCLANG_BIN = $(BIN_DIR)/InferClang
INFERJAVA_BIN = $(BIN_DIR)/InferJava INFERJAVA_BIN = $(BIN_DIR)/InferJava
INFERPRINT_BIN = $(BIN_DIR)/InferPrint INFERPRINT_BIN = $(BIN_DIR)/InferPrint
INFERUNIT_BIN = $(BIN_DIR)/InferUnit INFERUNIT_BIN = $(BIN_DIR)/InferUnit
INFER_BIN = $(BIN_DIR)/infer
INFERTRACEBUGS_BIN = $(BIN_DIR)/inferTraceBugs
INFER_ANALYZERS= INFER_ANALYZERS=
ifeq (@BUILD_C_ANALYZERS@,yes) ifeq (@BUILD_C_ANALYZERS@,yes)
@ -50,7 +52,7 @@ endif
JAVA_DEPS = $(addprefix $(PYTHON_LIB_DIR)/, \ JAVA_DEPS = $(addprefix $(PYTHON_LIB_DIR)/, \
analyze.py config.py issues.py jwlib.py source.py utils.py) \ analyze.py config.py issues.py jwlib.py source.py utils.py) \
$(addprefix $(CAPTURE_LIB_DIR)/, javac.py util.py) \ $(addprefix $(CAPTURE_LIB_DIR)/, javac.py util.py) \
$(BIN_DIR)/infer \ $(INFER_BIN) \
$(INFERANALYZE_BIN) \ $(INFERANALYZE_BIN) \
$(INFERJAVA_BIN) \ $(INFERJAVA_BIN) \
$(INFERPRINT_BIN) $(INFERPRINT_BIN)
@ -58,9 +60,21 @@ JAVA_DEPS = $(addprefix $(PYTHON_LIB_DIR)/, \
CLANG_DEPS = $(addprefix $(PYTHON_LIB_DIR)/, \ CLANG_DEPS = $(addprefix $(PYTHON_LIB_DIR)/, \
analyze.py config.py issues.py source.py utils.py) \ analyze.py config.py issues.py source.py utils.py) \
$(addprefix $(CAPTURE_LIB_DIR)/, make.py util.py) \ $(addprefix $(CAPTURE_LIB_DIR)/, make.py util.py) \
$(BIN_DIR)/infer \ $(INFER_BIN) \
$(INFERANALYZE_BIN) \ $(INFERANALYZE_BIN) \
$(INFERCLANG_BIN) \ $(INFERCLANG_BIN) \
$(INFERPRINT_BIN) $(INFERPRINT_BIN)
JAVA_MODELS_JAR = $(LIB_DIR)/java/models.jar JAVA_MODELS_JAR = $(LIB_DIR)/java/models.jar
ifneq (,$(findstring s,$(MAKEFLAGS)))
REMOVE = @rm -f
REMOVE_DIR = @rm -rf
else
REMOVE = @rm -vf
REMOVE_DIR = @rm -rvf
endif
COPY = cp -f -p
COPY_DIR = cp -rf
MKDIR = mkdir -p
LINK = ln -sf

@ -23,7 +23,7 @@ TARGETS_TO_TEST := $(shell echo $(TARGETS_TO_TEST))
all: $(INFER_ANALYZERS) all: $(INFER_ANALYZERS)
java: java: inferTraceBugs
ifneq (@BUILD_JAVA_ANALYZERS@,yes) ifneq (@BUILD_JAVA_ANALYZERS@,yes)
@echo @echo
@echo " error: java analyzers disabled by ./configure" @echo " error: java analyzers disabled by ./configure"
@ -36,7 +36,7 @@ else
$(MAKE) -C $(INFER_DIR) java $(MAKE) -C $(INFER_DIR) java
endif endif
clang: clang: inferTraceBugs
ifneq (@BUILD_C_ANALYZERS@,yes) ifneq (@BUILD_C_ANALYZERS@,yes)
@echo @echo
@echo " error: clang analyzers disabled by ./configure" @echo " error: clang analyzers disabled by ./configure"
@ -106,14 +106,17 @@ ifeq (@BUILD_JAVA_ANALYZERS@,yes)
NO_BUCKD=1 ./infer/tests/build_systems/build_integration_tests.py NO_BUCKD=1 ./infer/tests/build_systems/build_integration_tests.py
endif endif
inferTraceBugs:
make -C infer $(INFERTRACEBUGS_BIN)
inferTraceBugs_test: $(INFER_ANALYZERS) inferTraceBugs_test: $(INFER_ANALYZERS)
ifeq (@BUILD_JAVA_ANALYZERS@,yes) ifeq (@BUILD_JAVA_ANALYZERS@,yes)
$(PYTHON_DIR)/infer -o __test-infer-out__ -- \ $(INFER_BIN) -o __test-infer-out__ -- \
javac $(EXAMPLES_DIR)/Hello.java \ javac $(EXAMPLES_DIR)/Hello.java \
> /dev/null > /dev/null
@rm -f Hello.class @rm -f Hello.class
else else
$(PYTHON_DIR)/infer -o __test-infer-out__ \ $(INFER_BIN) -o __test-infer-out__ \
-- clang -c $(EXAMPLES_DIR)/hello.c \ -- clang -c $(EXAMPLES_DIR)/hello.c \
> /dev/null > /dev/null
@rm -f hello.o @rm -f hello.o
@ -141,5 +144,5 @@ endif
$(MAKE) -C $(INFER_DIR) clean $(MAKE) -C $(INFER_DIR) clean
.PHONY: all buck_test buck_test_xml clean clang .PHONY: all buck_test buck_test_xml clean clang
.PHONY: clang_plugin clang_setup inferTraceBugs_test java ocaml_unit_test .PHONY: clang_plugin clang_setup inferTraceBugs inferTraceBugs_test java
.PHONY: test test_xml test_build unit .PHONY: ocaml_unit_test test test_xml test_build unit

@ -10,18 +10,21 @@ ROOT_DIR = ..
include $(ROOT_DIR)/Makefile.config include $(ROOT_DIR)/Makefile.config
all: clang java llvm checkCopyright all: clang java llvm $(INFER_BIN) $(INFERTRACEBUGS_BIN) checkCopyright
java: $(INFER_BIN) $(INFERTRACEBUGS_BIN):
ln -sf ../lib/python/$(@F) $@
java: $(INFER_BIN)
$(MAKE) -C $(SRC_DIR) java $(MAKE) -C $(SRC_DIR) java
$(MAKE) -C $(ANNOTATIONS_DIR) $(MAKE) -C $(ANNOTATIONS_DIR)
$(MAKE) -C $(MODELS_DIR) java $(MAKE) -C $(MODELS_DIR) java
clang: clang: $(INFER_BIN)
$(MAKE) -C $(SRC_DIR) clang $(MAKE) -C $(SRC_DIR) clang
$(MAKE) -C $(MODELS_DIR) clang $(MAKE) -C $(MODELS_DIR) clang
llvm: llvm: $(INFER_BIN)
$(MAKE) -C $(SRC_DIR) llvm $(MAKE) -C $(SRC_DIR) llvm
checkCopyright: checkCopyright:
@ -31,5 +34,6 @@ clean:
$(MAKE) -C $(SRC_DIR) clean $(MAKE) -C $(SRC_DIR) clean
$(MAKE) -C $(ANNOTATIONS_DIR) clean $(MAKE) -C $(ANNOTATIONS_DIR) clean
$(MAKE) -C $(MODELS_DIR) clean $(MAKE) -C $(MODELS_DIR) clean
$(REMOVE) $(INFER_BIN) $(INFERTRACEBUGS_BIN)
.PHONY: all checkCopyright clang clean java llvm models .PHONY: all checkCopyright clang clean java llvm models

@ -1 +0,0 @@
../lib/python/infer

@ -1 +0,0 @@
../lib/python/inferTraceBugs

@ -9,7 +9,7 @@
ROOT_DIR = ../../.. ROOT_DIR = ../../..
include $(ROOT_DIR)/Makefile.config include $(ROOT_DIR)/Makefile.config
INFER = INFER_ANALYZE_MODELS=1 $(BIN_DIR)/infer \ INFER = INFER_ANALYZE_MODELS=1 $(INFER_BIN) \
--buck --analyzer infer --multicore 1 --buck --analyzer infer --multicore 1
JAVA_MODELS_SOURCES = $(shell find $(JAVA_MODELS_DIR)/src -name "*.java") JAVA_MODELS_SOURCES = $(shell find $(JAVA_MODELS_DIR)/src -name "*.java")

@ -13,17 +13,6 @@ INFER_MINOR = @INFER_MINOR@
INFER_PATCH = @INFER_PATCH@ INFER_PATCH = @INFER_PATCH@
INFER_IS_RELEASE = @INFER_IS_RELEASE@ INFER_IS_RELEASE = @INFER_IS_RELEASE@
ifneq (,$(findstring s,$(MAKEFLAGS)))
REMOVE = @rm -f
REMOVE_DIR = @rm -rf
else
REMOVE = @rm -vf
REMOVE_DIR = @rm -rvf
endif
COPY = cp -f -p
COPY_DIR = cp -rf
MKDIR = mkdir -p
LINK = ln -sf
ATDGEN = @ATDGEN@ ATDGEN = @ATDGEN@
#### Global declarations #### #### Global declarations ####

Loading…
Cancel
Save