From 6ee5f7e8e8412e1499e4e7226e5a6bc08254d9ed Mon Sep 17 00:00:00 2001 From: Joscha Schmiedt <joscha@schmiedt.dev> Date: Wed, 5 Mar 2025 22:45:13 +0100 Subject: [PATCH] Add make src to quickly generate protobuf code --- Makefile | 11 +++++++++++ README_SETUP.md | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/Makefile b/Makefile index 5c2bedc..a4a2fcd 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,17 @@ ALL: @echo "THIS IS ONLY FOR DEVELOPMENT. DON'T USE IT" +src: + mkdir -p src/java &&\ + mkdir -p src/python &&\ + mkdir -p src/cpp &&\ + mkdir -p src/js&&\ + protoc -Iproto --java_out=src/java --python_out=src/python --cpp_out=src/cpp --js_out=src/js $$(find ./proto -type f -iname "*.proto") + +clean: + rm -rf src +.PHONY: clean src + formatting: clang-format -i $$(find proto/ -type f -iname "*.proto") diff --git a/README_SETUP.md b/README_SETUP.md index 78222f0..746b154 100644 --- a/README_SETUP.md +++ b/README_SETUP.md @@ -17,6 +17,11 @@ contains all necessary configuration. We use [buf](https://docs.buf.build/) for linting. Run `buf lint`. The `buf.yaml` contains all necessary configuration. +## Source code generation + +`make src` generates the protobuf code for Java, C++, Python and JavaScript using +the locally installed `protoc`. + ## Docs We use [cmake](https://cmake.org) as build tool for the documenation and -- GitLab