forked from facebook/infer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
103 lines (88 loc) · 2.53 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# 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
TARGETS_TO_TEST=
ifeq (@BUILD_C_ANALYZERS@,yes)
TARGETS_TO_TEST += c cpp
endif
ifeq (@BUILD_JAVA_ANALYZERS@,yes)
TARGETS_TO_TEST += java
endif
ifneq (@XCODE_SELECT@,no)
TARGETS_TO_TEST += objc
endif
TARGETS_TO_TEST := $(shell echo $(TARGETS_TO_TEST))
all: $(INFER_ANALYZERS)
ifneq (@BUILD_JAVA_ANALYZERS@,yes)
java:
@echo
@echo " error: java analyzers disabled by ./configure"
@echo " to enable them again, see"
@echo
@echo " ./configure --help"
@echo
@exit 1
else
java:
$(MAKE) -C $(INFER_DIR) java
endif
clang_setup:
export CC="@CC@" CFLAGS="@CFLAGS@"; \
export CXX="@CXX@" CXXFLAGS="@CXXFLAGS@"; \
export CPP="@CPP@" LDFLAGS="@LDFLAGS@" LIBS="@LIBS@"; \
$(FCP_DIR)/clang/setup.sh
clang_plugin: clang_setup
$(MAKE) -C $(FCP_DIR)/libtooling all \
CC=@CC@ CXX=@CXX@ \
CXX="@CXX@" CXXFLAGS="@CXXFLAGS@" \
CPP="@CPP@" LDFLAGS="@LDFLAGS@" LIBS="@LIBS@" \
LOCAL_CLANG=@CLANG_PREFIX@/bin/clang \
CLANG_PREFIX=@CLANG_PREFIX@ \
CLANG_INCLUDES=@CLANG_INCLUDES@
$(MAKE) -C $(FCP_DIR)/clang-ocaml all \
build/clang_ast_proj.ml build/clang_ast_proj.mli \
CC=@CC@ CXX=@CXX@ \
CXX="@CXX@" CXXFLAGS="@CXXFLAGS@" \
CPP="@CPP@" LDFLAGS="@LDFLAGS@" LIBS="@LIBS@" \
LOCAL_CLANG=@CLANG_PREFIX@/bin/clang \
CLANG_PREFIX=@CLANG_PREFIX@ \
CLANG_INCLUDES=@CLANG_INCLUDES@
ifneq (@BUILD_C_ANALYZERS@,yes)
clang:
@echo
@echo " error: clang analyzers disabled by ./configure"
@echo " to enable them again, see"
@echo
@echo " ./configure --help"
@echo
@exit 1
else
clang: clang_plugin
$(MAKE) -C $(INFER_DIR) clang
endif
buck_test: $(INFER_ANALYZERS)
NO_BUCKD=1 buck clean
NO_BUCKD=1 buck test $(TARGETS_TO_TEST)
buck_test_xml: $(INFER_ANALYZERS)
NO_BUCKD=1 buck clean
NO_BUCKD=1 buck test --xml test.xml $(TARGETS_TO_TEST)
build_integration_tests: $(INFER_ANALYZERS)
./scripts/build_integration_tests.py
test: buck_test
test_xml: buck_test_xml
ifeq (@BUILD_JAVA_ANALYZERS@,yes)
test: build_integration_tests
test_xml: build_integration_tests
endif
clean:
@rm -fv test.xml
$(MAKE) -C $(FCP_DIR) clean
$(MAKE) -C $(FCP_DIR)/clang-ocaml clean
$(MAKE) -C $(INFER_DIR) clean
.PHONY: all build_integration_tests clean clang clang_plugin clang_setup java test test_xml