forked from waterslideLTS/waterslide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·79 lines (65 loc) · 2.02 KB
/
Copy pathMakefile
File metadata and controls
executable file
·79 lines (65 loc) · 2.02 KB
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
#
# Top-level build for waterslide
#
# Invokes the next layer twice: first for serial WS, second for parallel WS
#
include ./src/common.mk
DIR_ERROR=0
ifeq "$(WS_BIN_DIR)" ""
DIR_ERROR = 1
endif
ifeq "$(WS_LIB_DIR)" ""
DIR_ERROR = 1
endif
.PHONY: all install test uninstall clean
all:
# @export WS_HOME
@echo "Building SERIAL waterslide"
@unset WS_PARALLEL ; $(MAKE) --no-print-directory -C src
@echo "Building PARALLEL waterslide"
@WS_PARALLEL=1 $(MAKE) --no-print-directory -C src
$(LINK) bin/waterslide
$(LINK) bin/waterslide-parallel
$(LINK) bin/wsalias
$(LINK) bin/wsman
@echo "waterslide build completed"
install:
$(MAKE) -C src install
test: all install test/kidtest/kidtest.sh
./test/kidtest/kidtest.sh
@echo "waterslide kidtests completed"
uninstall:
$(MAKE) -C src uninstall
clean:
@unset WS_PARALLEL ; $(MAKE) --no-print-directory -C src clean
$(RM) waterslide waterslide-parallel wsalias wsman
ifneq "$(DIR_ERROR)" "1"
# $(RM) -r $(WS_LIB_DIR)
# don't delete the protobuf stuff; use "make scour" for that
ifneq "$(wildcard $(WS_LIB_DIR))" ""
$(FIND) $(WS_LIB_DIR) -maxdepth 1 -type f -delete
endif
$(RM) $(WS_BIN_DIR)/* $(WS_PROCS_DIR)/proc_*
$(RM) -r $(RPM_OUTDIR)
else
@echo "*** Error: problem with distribution directories"
endif
.PHONY: scour
scour: clean
-$(RM) -r $(WS_LIB_DIR)
DT := $(shell date -u +%Y%m%d.%H%M)
BASEDISTRO := `basename $(PWD)`
DIRNAME := `dirname $(PWD)`
tar: scour
@echo "Cleaning git repository"
@echo "distro $(BASEDISTRO) -- $(PWD) -- $(DIRNAME)"
-@git gc
@echo "Building ../$(BASEDISTRO)_$(DT).tar.bz2"
@cd .. && tar -cvjf $(BASEDISTRO)_$(DT).tar.bz2 $(BASEDISTRO)/. --exclude=".nfs*" > /dev/null
@du -h "$(DIRNAME)/$(BASEDISTRO)_$(DT).tar.bz2"
tar_ng: scour
@echo "Cleaning git repository"
@echo "Building ../$(BASEDISTRO)_$(DT)_nogit.tar.bz2"
@cd .. && tar -cvjf $(BASEDISTRO)_$(DT)_nogit.tar.bz2 $(BASEDISTRO)/. --exclude=.git* --exclude=*.nfs* --group=nobody --owner=nobody >/dev/null
@du -h "$(DIRNAME)/$(BASEDISTRO)_$(DT)_nogit.tar.bz2"
tar_nogit: tar_ng