forked from BV-BRC/p3_msa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (39 loc) · 1.79 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
TOP_DIR = ../..
include $(TOP_DIR)/tools/Makefile.common
APP_SERVICE = app_service
DEPLOY_RUNTIME ?= /kb/runtime
TARGET ?= /kb/deployment
WRAP_PYTHON_TOOL = wrap_python3
WRAP_PYTHON_SCRIPT = bash $(TOOLS_DIR)/$(WRAP_PYTHON3_TOOL).sh
SRC_PYTHON = $(wildcard scripts/*.py)
SRC_PERL = $(wildcard scripts/*.pl)
BIN_PERL = $(addprefix $(BIN_DIR)/,$(basename $(notdir $(SRC_PERL))))
DEPLOY_PERL = $(addprefix $(TARGET)/bin/,$(basename $(notdir $(SRC_PERL))))
SRC_SERVICE_PERL = $(wildcard service-scripts/*.pl)
BIN_SERVICE_PERL = $(addprefix $(BIN_DIR)/,$(basename $(notdir $(SRC_SERVICE_PERL))))
DEPLOY_SERVICE_PERL = $(addprefix $(SERVICE_DIR)/bin/,$(basename $(notdir $(SRC_SERVICE_PERL))))
CLIENT_TESTS = $(wildcard t/client-tests/*.t)
SERVER_TESTS = $(wildcard t/server-tests/*.t)
PROD_TESTS = $(wildcard t/prod-tests/*.t)
STARMAN_WORKERS = 8
STARMAN_MAX_REQUESTS = 100
TPAGE_ARGS = --define kb_top=$(TARGET) --define kb_runtime=$(DEPLOY_RUNTIME) --define kb_service_name=$(SERVICE) \
--define kb_service_port=$(SERVICE_PORT) --define kb_service_dir=$(SERVICE_DIR) \
--define kb_sphinx_port=$(SPHINX_PORT) --define kb_sphinx_host=$(SPHINX_HOST) \
--define kb_starman_workers=$(STARMAN_WORKERS) \
--define kb_starman_max_requests=$(STARMAN_MAX_REQUESTS)
all: bin
bin: $(BIN_PYTHON) $(BIN_PERL) $(BIN_SERVICE_PERL)
deploy: deploy-all
deploy-all: deploy-client
deploy-client: deploy-libs deploy-scripts deploy-docs
deploy-service: deploy-libs deploy-scripts deploy-service-scripts deploy-specs
deploy-specs:
mkdir -p $(TARGET)/services/$(APP_SERVICE)
rsync -arv app_specs $(TARGET)/services/$(APP_SERVICE)/.
deploy-dir:
if [ ! -d $(SERVICE_DIR) ] ; then mkdir $(SERVICE_DIR) ; fi
if [ ! -d $(SERVICE_DIR)/bin ] ; then mkdir $(SERVICE_DIR)/bin ; fi
deploy-docs:
clean:
include $(TOP_DIR)/tools/Makefile.common.rules