From 9d94687b0d822468cd91a1710fcbb0bcd28a27ec Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 21 Sep 2023 16:24:07 +0930 Subject: [PATCH] Makefile: don't fail find -delete if we run in parallel. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use xargs rm -f which doesn't care if it's already deleted. ``` find contrib/pyln-grpc-proto/pyln/ -type f -name "*.py.bak" -delete find contrib/pyln-grpc-proto/pyln/ -type f -name "*.py.bak" -delete find: cannot delete ‘contrib/pyln-grpc-proto/pyln/grpc/node_pb2_grpc.py.bak’: No such file or directory make: *** [Makefile:390: contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py] Error 1 make: *** Waiting for unfinished jobs.... ``` Signed-off-by: Rusty Russell --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c0627911f..e565fcb3e 100644 --- a/Makefile +++ b/Makefile @@ -385,7 +385,7 @@ $(GRPC_GEN)&: cln-grpc/proto/node.proto cln-grpc/proto/primitives.proto $(PYTHON) -m grpc_tools.protoc -I cln-grpc/proto cln-grpc/proto/node.proto --python_out=$(GRPC_PATH)/ --grpc_python_out=$(GRPC_PATH)/ --experimental_allow_proto3_optional $(PYTHON) -m grpc_tools.protoc -I cln-grpc/proto cln-grpc/proto/primitives.proto --python_out=$(GRPC_PATH)/ --experimental_allow_proto3_optional find $(GRPC_DIR)/ -type f -name "*.py" -print0 | xargs -0 sed -i'.bak' -e 's/^import \(.*\)_pb2 as .*__pb2/from pyln.grpc import \1_pb2 as \1__pb2/g' - find $(GRPC_DIR)/ -type f -name "*.py.bak" -delete + find $(GRPC_DIR)/ -type f -name "*.py.bak" -print0 | xargs rm -f endif # We make pretty much everything depend on these.