-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (40 loc) · 1.27 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
TOP_DIR = ../..
include $(TOP_DIR)/tools/Makefile.common
TARGET ?= /tmp/deployment
DEPLOY_TARGET ?= $(TARGET)
DEPLOY_RUNTIME ?= /disks/patric-common/runtime
TESTS = $(wildcard t/client-tests/*.t)
all:
#all: build-libs bin
build-libs:
test:
# run each test
echo "RUNTIME=$(DEPLOY_RUNTIME)\n"
for t in $(TESTS) ; do \
if [ -f $$t ] ; then \
$(DEPLOY_RUNTIME)/bin/perl $$t ; \
if [ $$? -ne 0 ] ; then \
exit 1 ; \
fi \
fi \
done
service: $(SERVICE_MODULE)
bin: $(BIN_PERL) $(BIN_SERVICE_PERL)
deploy: deploy-client deploy-service
deploy-all: deploy-client deploy-service
deploy-client: build-libs deploy-libs deploy-scripts
deploy-service: deploy-dir deploy-libs deploy-service-scripts
deploy-service-scripts:
export KB_TOP=$(TARGET); \
export KB_RUNTIME=$(DEPLOY_RUNTIME); \
export KB_PERL_PATH=$(TARGET)/lib ; \
export PATH_PREFIX=$(TARGET)/services/$(SERVICE)/bin:$(TARGET)/services/cdmi_api/bin; \
for src in $(SRC_SERVICE_PERL) ; do \
basefile=`basename $$src`; \
base=`basename $$src .pl`; \
echo install $$src $$base ; \
cp $$src $(TARGET)/plbin ; \
$(WRAP_PERL_SCRIPT) "$(TARGET)/plbin/$$basefile" $(TARGET)/services/$(SERVICE)/bin/$$base ; \
done
deploy-dir:
include $(TOP_DIR)/tools/Makefile.common.rules