forked from Ericsson/codechecker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
88 lines (62 loc) · 2.03 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
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
-include Makefile.local
CURRENT_DIR = $(shell pwd)
BUILD_DIR = $(CURRENT_DIR)/build
# Root of the repository.
ROOT = $(CURRENT_DIR)
ACTIVATE_RUNTIME_VENV ?= . venv/bin/activate
ACTIVATE_DEV_VENV ?= . venv_dev/bin/activate
VENV_REQ_FILE ?= requirements_py/requirements.txt
VENV_DEV_REQ_FILE ?= requirements_py/dev/requirements.txt
OSX_VENV_REQ_FILE ?= requirements_py/osx/requirements.txt
default: package
# Test running related targets.
include tests/Makefile
gen-docs: build_dir
doxygen ./Doxyfile.in && \
cp -a ./gen-docs $(BUILD_DIR)/gen-docs
thrift: build_dir
if [ -d "$(BUILD_DIR)/thrift" ]; then rm -rf $(BUILD_DIR)/thrift; fi
mkdir $(BUILD_DIR)/thrift
BUILD_DIR=$(BUILD_DIR) $(MAKE) -C api/
userguide: build_dir
$(MAKE) -C www/userguide
package: clean_package build_dir gen-docs thrift userguide build_plist_to_html
./scripts/build_package.py -r $(ROOT) -o $(BUILD_DIR) -b $(BUILD_DIR)
build_dir:
mkdir -p $(BUILD_DIR)
build_plist_to_html:
$(MAKE) -C vendor/plist_to_html
venv:
# Create a virtual environment which can be used to run the build package.
virtualenv -p python2 venv && \
$(ACTIVATE_RUNTIME_VENV) && pip install -r $(VENV_REQ_FILE)
venv_osx:
# Create a virtual environment which can be used to run the build package.
virtualenv -p python2 venv && \
$(ACTIVATE_RUNTIME_VENV) && pip install -r $(OSX_VENV_REQ_FILE)
clean_venv:
rm -rf venv
venv_dev:
# Create a virtual environment for development.
virtualenv -p python2 venv_dev && \
$(ACTIVATE_DEV_VENV) && pip install -r $(VENV_DEV_REQ_FILE) && \
pip install -r tests/requirements.txt
clean_venv_dev:
rm -rf venv_dev
clean: clean_package clean_vendor
clean_package: clean_userguide clean_plist_to_html
rm -rf $(BUILD_DIR)
rm -rf gen-docs
find . -name "*.pyc" -delete
clean_vendor:
rm -rf vendor/codemirror
rm -rf vendor/dojotoolkit
rm -rf vendor/fonts
rm -rf vendor/highlightjs
rm -rf vendor/jsplumb
rm -rf vendor/marked
rm -rf vendor/thrift
clean_userguide:
rm -rf www/userguide/gen-docs
clean_plist_to_html:
rm -rf vendor/plist_to_html/build