-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
41 lines (37 loc) · 1.39 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
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2020 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
.PHONY:
generate: clean generate-protos
# These command should be executed any time the proto definitions change. It is
# not required to be generated as part of a regular `swift build` since we're
# checking in the generated sources.
.PHONY:
generate-protos: proto-toolchain
mkdir -p Sources/TSFCAS/Generated
Utilities/tools/bin/protoc \
-I=Protos \
--plugin=Utilities/tools/bin/protoc-gen-swift \
--swift_out=Sources/TSFCAS/Generated \
--swift_opt=Visibility=Public \
--swift_opt=ProtoPathModuleMappings=Protos/module_map.asciipb \
$$(find Protos/CASProtocol -name \*.proto)
mkdir -p Sources/TSFCASFileTree/Generated
Utilities/tools/bin/protoc \
-I=Protos \
--plugin=Utilities/tools/bin/protoc-gen-swift \
--swift_out=Sources/TSFCASFileTree/Generated \
--swift_opt=Visibility=Public \
--swift_opt=ProtoPathModuleMappings=Protos/module_map.asciipb \
$$(find Protos/CASFileTreeProtocol -name \*.proto)
.PHONY:
proto-toolchain:
Utilities/build_proto_toolchain.sh
.PHONY:
clean:
rm -rf Sources/TSFCAS/Generated
rm -rf Sources/TSFCASFileTree/Generated