From 1f2e528b54b661e6db72e43bf9eb7006dd553288 Mon Sep 17 00:00:00 2001
From: JohanBlome <jblome@fb.com>
Date: Fri, 21 Jun 2024 15:13:18 -0700
Subject: [PATCH] encapp: generate python and swift code together

Changed the Makefile in proto.
"make all"
generate both swift and python
"make realclean" removed both generated files

Signed-off-by: JohanBlome <jblome@fb.com>
---
 proto/Makefile | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/proto/Makefile b/proto/Makefile
index d03d7ace..589def34 100644
--- a/proto/Makefile
+++ b/proto/Makefile
@@ -1,11 +1,12 @@
-all: none
-
-
-tests_pb2.py: tests.proto
-	protoc -I=. --python_out=../scripts/proto/ tests.proto
-
+python_path=../scripts/proto/
+swift_path=../ios/Encapp/
+# java will be generated when building with gradle
+all: tests.proto
+	protoc -I=. --python_out=$(python_path) tests.proto
+	protoc -I=. --swift_out=$(swift_path) tests.proto
 clean:
 	rm -f *pyc
 
 realclean: clean
-	rm -f tests_pb2.py
+	rm -f $(python_path)tests_pb2.py
+	rm -f $(swift_path)tests.pb.swift