OLD | NEW |
1 PLUGIN_SRC = \ | 1 PLUGIN_SRC = \ |
2 prepend.dart \ | 2 prepend.dart \ |
3 bin/protoc_plugin.dart \ | 3 bin/protoc_plugin.dart \ |
4 lib/code_generator.dart \ | 4 lib/code_generator.dart \ |
5 lib/enum_generator.dart \ | 5 lib/enum_generator.dart \ |
6 lib/exceptions.dart \ | 6 lib/exceptions.dart \ |
7 lib/extension_generator.dart \ | 7 lib/extension_generator.dart \ |
8 lib/file_generator.dart \ | 8 lib/file_generator.dart \ |
9 lib/indenting_writer.dart \ | 9 lib/indenting_writer.dart \ |
10 lib/message_generator.dart \ | 10 lib/message_generator.dart \ |
| 11 lib/options.dart \ |
| 12 lib/output_config.dart \ |
11 lib/protobuf_field.dart \ | 13 lib/protobuf_field.dart \ |
12 lib/protoc.dart \ | 14 lib/protoc.dart \ |
13 lib/src/descriptor.pb.dart \ | 15 lib/src/descriptor.pb.dart \ |
14 lib/src/plugin.pb.dart \ | 16 lib/src/plugin.pb.dart \ |
15 lib/writer.dart | 17 lib/writer.dart |
16 | 18 |
17 OUTPUT_DIR=out | 19 OUTPUT_DIR=out |
18 PLUGIN_NAME=protoc-gen-dart | 20 PLUGIN_NAME=protoc-gen-dart |
19 PLUGIN_PATH=$(OUTPUT_DIR)/$(PLUGIN_NAME) | 21 PLUGIN_PATH=$(OUTPUT_DIR)/$(PLUGIN_NAME) |
20 | 22 |
(...skipping 15 matching lines...) Expand all Loading... |
36 TEST_PROTO_LIBS=$(foreach proto, $(TEST_PROTO_LIST), $(TEST_PROTO_DIR)/$(proto).
pb.dart) | 38 TEST_PROTO_LIBS=$(foreach proto, $(TEST_PROTO_LIST), $(TEST_PROTO_DIR)/$(proto).
pb.dart) |
37 TEST_PROTO_SRC_DIR=test/protos | 39 TEST_PROTO_SRC_DIR=test/protos |
38 TEST_PROTO_SRCS=$(foreach proto, $(TEST_PROTO_LIST), $(TEST_PROTO_SRC_DIR)/$(pro
to).proto) | 40 TEST_PROTO_SRCS=$(foreach proto, $(TEST_PROTO_LIST), $(TEST_PROTO_SRC_DIR)/$(pro
to).proto) |
39 | 41 |
40 PREGENERATED_SRCS=lib/descriptor.proto lib/plugin.proto | 42 PREGENERATED_SRCS=lib/descriptor.proto lib/plugin.proto |
41 | 43 |
42 | 44 |
43 $(PLUGIN_PATH): $(PLUGIN_SRC) | 45 $(PLUGIN_PATH): $(PLUGIN_SRC) |
44 [ -d $(OUTPUT_DIR) ] || mkdir $(OUTPUT_DIR) | 46 [ -d $(OUTPUT_DIR) ] || mkdir $(OUTPUT_DIR) |
45 # --categories=all is a hack, it should be --categories=Server once dart
2dart bug is fixed. | 47 # --categories=all is a hack, it should be --categories=Server once dart
2dart bug is fixed. |
46 » dart2js --checked --output-type=dart --package-root=packages --categorie
s=all -o$(PLUGIN_PATH) bin/protoc_plugin.dart | 48 » dart2js --checked --output-type=dart --show-package-warnings --categorie
s=all -o$(PLUGIN_PATH) bin/protoc_plugin.dart |
47 dart prepend.dart $(PLUGIN_PATH) | 49 dart prepend.dart $(PLUGIN_PATH) |
48 chmod +x $(PLUGIN_PATH) | 50 chmod +x $(PLUGIN_PATH) |
49 | 51 |
50 $(TEST_PROTO_LIBS): $(PLUGIN_PATH) $(TEST_PROTO_SRCS) | 52 $(TEST_PROTO_LIBS): $(PLUGIN_PATH) $(TEST_PROTO_SRCS) |
51 [ -d $(TEST_PROTO_DIR) ] || mkdir $(TEST_PROTO_DIR) | 53 [ -d $(TEST_PROTO_DIR) ] || mkdir $(TEST_PROTO_DIR) |
52 protoc\ | 54 protoc\ |
53 --dart_out=$(TEST_PROTO_DIR)\ | 55 --dart_out=$(TEST_PROTO_DIR)\ |
54 -I$(TEST_PROTO_SRC_DIR)\ | 56 -I$(TEST_PROTO_SRC_DIR)\ |
55 --plugin=protoc-gen-dart=$(realpath $(PLUGIN_PATH))\ | 57 --plugin=protoc-gen-dart=$(realpath $(PLUGIN_PATH))\ |
56 $(TEST_PROTO_SRCS) | 58 $(TEST_PROTO_SRCS) |
57 | 59 |
58 .PHONY: build-plugin update-pregenerated build-test-protos run-tests clean | 60 .PHONY: build-plugin update-pregenerated build-test-protos run-tests clean |
59 | 61 |
60 build-plugin: $(PLUGIN_PATH) | 62 build-plugin: $(PLUGIN_PATH) |
61 | 63 |
62 update-pregenerated: $(PLUGIN_PATH) $(PREGENERATED_SRCS) | 64 update-pregenerated: $(PLUGIN_PATH) $(PREGENERATED_SRCS) |
63 protoc --dart_out=lib/src -Ilib --plugin=protoc-gen-dart=$(realpath $(PL
UGIN_PATH)) $(PREGENERATED_SRCS) | 65 protoc --dart_out=lib/src -Ilib --plugin=protoc-gen-dart=$(realpath $(PL
UGIN_PATH)) $(PREGENERATED_SRCS) |
64 | 66 |
65 build-test-protos: $(TEST_PROTO_LIBS) | 67 build-test-protos: $(TEST_PROTO_LIBS) |
66 | 68 |
67 run-tests: build-test-protos | 69 run-tests: build-test-protos |
68 » dart --checked --package-root=packages/ test/all_tests.dart | 70 » dart --checked test/all_tests.dart |
69 | 71 |
70 clean: | 72 clean: |
71 rm -rf $(OUTPUT_DIR) | 73 rm -rf $(OUTPUT_DIR) |
OLD | NEW |