From 2dd37ae6da931ed102a4266dd0eaca79e774edcf Mon Sep 17 00:00:00 2001 From: James Kessler Date: Thu, 19 Sep 2024 11:09:04 -0700 Subject: [PATCH] Run both commands inside the containers for each strip target: && . --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index ed766b9..10ebc9c 100644 --- a/Makefile +++ b/Makefile @@ -48,14 +48,15 @@ compile-aarch64: .PHONY: strip-aarch64 strip-aarch64: $(BINARY_AARCH64) - #docker run --rm -v $(shell pwd):/app -w /app ${IMAGE_NAME}:${VERSION} strip $(BINARY_AARCH64) - docker run --rm -v $(shell pwd):/app -w /app ${IMAGE_NAME}:${VERSION} zig objcopy --strip-all $(BINARY_AARCH64) $(BINARY_AARCH64)-stripped - mv $(BINARY_AARCH64)-stripped $(BINARY_AARCH64) + docker run --rm -v $(shell pwd):/app -w /app ${IMAGE_NAME}:${VERSION} /bin/sh -c \ + "zig objcopy --strip-all $(BINARY_AARCH64) $(BINARY_AARCH64)-stripped && \ + mv $(BINARY_AARCH64)-stripped $(BINARY_AARCH64)" .PHONY: strip-x86_64 strip-x86_64: $(BINARY_X86_64) - docker run --rm -v $(shell pwd):/app -w /app ${IMAGE_NAME}:${VERSION} zig objcopy --strip-all $(BINARY_X86_64) $(BINARY_X86_64)-stripped - mv $(BINARY_X86_64)-stripped $(BINARY_X86_64) + docker run --rm -v $(shell pwd):/app -w /app ${IMAGE_NAME}:${VERSION} /bin/sh -c \ + "zig objcopy --strip-all $(BINARY_X86_64) $(BINARY_X86_64)-stripped && \ + mv $(BINARY_X86_64)-stripped $(BINARY_X86_64)" .PHONY: compile-and-strip-all compile-and-strip-all: compile-aarch64 compile-x86_64 strip-aarch64 strip-x86_64