-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
60 lines (46 loc) · 1.7 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
#
# Makefile to build apis for various bindings
#
define colorecho
$(if $(TERM),
@tput setaf $2
@echo $1
@tput sgr0,
@echo $1)
endef
help: ## Show this help dialog.
@echo
$(call colorecho, "⁉️ Help", 5)
@echo
$(call colorecho, "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' | column -c2 -t -s :)", 4)
@echo
build_gen_go: ## Build Go api gen files
@echo "Building gen GO apis files"
@cd gen-go; ./build.sh
build_gen_java: ## Build Java api gen files
@echo "Building gen JAVA apis files"
@cd gen-java; ./build.sh
@echo "Compiling and installing (.m2) java files"
@cd gen-java/queue; mvn clean install
build_client: build_gen_go ## Building queue client
@echo "Building queue client"
@cd queue-client; (cd src ; go build -o ../queue-client)
build_server: build_gen_java ## Building queue server
@echo "Building queue server"
@cd queue-server; mvn install
clean_gen_go: ## Cleanup Go api gen files
@echo "Cleaning GO api files"
@rm -Rf gen-go/api
clean_gen_java: ## Cleanup Java api gen files
@echo "Cleaning Java apis files"
rm -Rf "gen-java/queue/src/main/java/*";
rm -Rf "gen-java/queue/target";
clean_client: ## Cleaning queue client
@echo "Building queue client"
@cd queue-client; rm -f queue-client
clean_server: ## Cleaning queue server
@echo "Building queue server"
@cd queue-server; mvn clean
clean: clean_gen_go clean_gen_java clean_client clean_server ## Cleanup all api gens & server
all: build_gen_go build_gen_java build_server ## Build all api gens & server
.PHONY: all build_gen_go build_gen_java build_client build_server clean clean_gen_go clean_gen_java clean_client clean_server