aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/protobuffs.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2023-05-15 12:12:10 +0200
committerLoïc Hoguin <[email protected]>2023-05-15 12:16:05 +0200
commitc0326f6fcaceffe8ab3d071b9cbf47849cc91814 (patch)
tree0f7a73ba6a67921712d0b22e5508dd8c5d58134c /plugins/protobuffs.mk
parent4704d49d915b664d92e82a45d51a9641ba87f2d2 (diff)
downloaderlang.mk-c0326f6fcaceffe8ab3d071b9cbf47849cc91814.tar.gz
erlang.mk-c0326f6fcaceffe8ab3d071b9cbf47849cc91814.tar.bz2
erlang.mk-c0326f6fcaceffe8ab3d071b9cbf47849cc91814.zip
Fix gpb proto compilation with imports
The option {i, ...} is added for every directory containing proto files. The option {use_packages, true} was added as well to allow using packages. This is not the default for historic reasons in gpb but it makes better sense to have it as default so we do it.
Diffstat (limited to 'plugins/protobuffs.mk')
-rw-r--r--plugins/protobuffs.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/protobuffs.mk b/plugins/protobuffs.mk
index 809df42..0ebe159 100644
--- a/plugins/protobuffs.mk
+++ b/plugins/protobuffs.mk
@@ -41,10 +41,13 @@ else
define compile_proto.erl
[begin
gpb_compile:file(F, [
+ $(foreach i,$(sort $(dir $(PROTO_FILES))),{i$(comma) "$i"}$(comma))
{include_as_lib, true},
{module_name_suffix, "_pb"},
{o_hrl, "./include"},
- {o_erl, "./src"}])
+ {o_erl, "./src"},
+ {use_packages, true}
+ ])
end || F <- string:tokens("$1", " ")],
halt().
endef