-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (30 loc) · 1.61 KB
/
Makefile
File metadata and controls
35 lines (30 loc) · 1.61 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
.PHONY: clean
clean:
rm -f wasm/*
rm -rf core-v3/src/main/resources/google
rm -rf core-v4/src/main/resources/google
.PHONY: build
build: build-v3 build-v4
.PHONY: build-v3
build-v3:
docker build --progress=plain . -f buildtools-v3/Dockerfile -t protoc-wrapper-v3
docker create --name dummy-protoc-wrapper-v3 protoc-wrapper-v3
docker cp dummy-protoc-wrapper-v3:/workspace/build/protoc-wrapper.wasm wasm/protoc-wrapper-v3.wasm
mkdir -p core-v3/src/main/resources/google/protobuf
docker cp dummy-protoc-wrapper-v3:/workspace/protobuf/src/google/protobuf/. core-v3/src/main/resources/google/protobuf/
rm -rf core-v3/src/main/resources/google/protobuf/*/
find core-v3/src/main/resources/google/protobuf -maxdepth 1 -type f \( -name "*unittest*.proto" -o -name "*test*.proto" -o ! -name "*.proto" \) -delete
docker rm -f dummy-protoc-wrapper-v3
.PHONY: build-v4
build-v4:
docker build --progress=plain . -f buildtools-v4/Dockerfile -t protoc-wrapper-v4
docker create --name dummy-protoc-wrapper-v4 protoc-wrapper-v4
docker cp dummy-protoc-wrapper-v4:/workspace/build/protoc-wrapper.wasm wasm/protoc-wrapper-v4.wasm
mkdir -p core-v4/src/main/resources/google/protobuf
docker cp dummy-protoc-wrapper-v4:/workspace/protobuf/src/google/protobuf/. core-v4/src/main/resources/google/protobuf/
rm -rf core-v4/src/main/resources/google/protobuf/*/
find core-v4/src/main/resources/google/protobuf -maxdepth 1 -type f \( -name "*unittest*.proto" -o -name "*test*.proto" -o ! -name "*.proto" \) -delete
docker rm -f dummy-protoc-wrapper-v4
# Legacy target for backwards compatibility
.PHONY: build-protoc-wrapper
build-protoc-wrapper: build-v3