Skip to content

Commit 1dc231d

Browse files
committed
build: add packing of artifacts to Makefile
1 parent fdc2d2e commit 1dc231d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
ARCHS := x86_64 arm aarch64 powerpc
22
TARGETS := $(addprefix build-, $(ARCHS))
3+
PACK_TARGETS := $(addprefix pack-, $(ARCHS))
34

4-
.PHONY: clean help download_packages build patch-gdb build-docker-image $(TARGETS)
5+
.PHONY: clean help download_packages build patch-gdb build-docker-image $(TARGETS) $(PACK_TARGETS)
56

67
help:
78
@echo "Usage:"
@@ -47,6 +48,13 @@ $(TARGETS): build-%: download-packages patch-gdb build-docker-image
4748
--rm --volume .:/app/gdb gdb-static env TERM=xterm-256color \
4849
/app/gdb/src/build.sh $* /app/gdb/build/ /app/gdb/src/gdb_static.patch
4950

51+
pack: $(PACK_TARGETS)
52+
53+
$(PACK_TARGETS): pack-%: build-%
54+
if [ ! -f "build/artifacts/gdb-static-$*.tar.gz" ]; then \
55+
tar -czf "build/artifacts/gdb-static-$*.tar.gz" -C "build/artifacts/$*" .; \
56+
fi
57+
5058
clean:
5159
rm -rf build
5260
# Kill and remove all containers of image gdb-static

0 commit comments

Comments
 (0)