diff options
author | Loïc Hoguin <[email protected]> | 2023-05-15 12:12:10 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2023-05-15 12:16:05 +0200 |
commit | c0326f6fcaceffe8ab3d071b9cbf47849cc91814 (patch) | |
tree | 0f7a73ba6a67921712d0b22e5508dd8c5d58134c | |
parent | 4704d49d915b664d92e82a45d51a9641ba87f2d2 (diff) | |
download | erlang.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.
-rw-r--r-- | CHANGELOG.asciidoc | 3 | ||||
-rw-r--r-- | plugins/protobuffs.mk | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 3a8540b..c227dde 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -40,3 +40,6 @@ 2023/05/12: A number of broken packages have been removed. They were all unmaintained and there's a low chance that this will break anyone's project. + +2023/05/15: Protobuff compilation with `gpb` now uses the + `{use_packages, true}` option. 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 |