forked from facebook/hhvm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (40 loc) · 1.1 KB
/
Makefile
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
PROJECT_ROOT = .
include src/dirs.mk
TEST := $(if $(OUT_TOP),$(OUT_TOP),test/)test
ifneq ($(OUT_TOP),)
COPY = && cp $(OUT_TOP)/hphpi src/hphpi/hphpi && cp $(OUT_TOP)/hphp src/hphp/hphp
else
COPY =
endif
ifneq ($(filter fast_tests slow_tests,$(MAKECMDGOALS)),)
# run all tests, even if some fail
MAKEFLAGS += k
.NOTPARALLEL:
endif
QuickTests = "" "" $@
TestExt = "" "" $@
FAST_TESTS := QuickTests TestExt TestCodeRunEval
SLOW_TESTS := TestCodeRun TestServer
all: fast_tests
$(FAST_TESTS) $(SLOW_TESTS): % : setup
cd src && $(TEST) $(if $($@),$($@),$@)
setup:
$(MAKE) -C src $(COPY)
fast_tests: $(FAST_TESTS)
slow_tests: $(SLOW_TESTS)
.PHONY: $(FAST_TESTS) $(SLOW_TESTS)
.PHONY: debug release both check_by_type fast_tests slow_tests setup
check_by_type:
@if [ -z "$$OUTDIR_BY_TYPE" ] ; then \
echo "You need to set OUTDIR_BY_TYPE to build both DEBUG and RELEASE into the same client"; \
exit 1; \
fi
release: check_by_type
$(MAKE) -Csrc RELEASE=1 DEBUG=
debug: check_by_type
$(MAKE) -Csrc RELEASE= DEBUG=1
both: debug release
clobber:
$(MAKE) -C src clobber
$(MAKE) -C facebook clobber
clean: clobber