From 2b3c5492c7f1723eb6c17c401bc3b6cd7766de27 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Wed, 27 Mar 2013 14:35:11 +0000 Subject: [PATCH] Add option to create archive of build product --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d665263f..f843993c 100644 --- a/Makefile +++ b/Makefile @@ -1209,10 +1209,16 @@ endif @echo "" ifneq ($(TARGETS),) ifndef DEBUG_MAKEFILE - @$(MAKE) $(TARGETS) V=$(V) + @$(MAKE) $(TARGETS) $(B).zip V=$(V) endif endif +$(B).zip: $(TARGETS) +ifdef ARCHIVE + @rm -f $@ + @(cd $(B) && zip -r9 ../../$@ $(NAKED_TARGETS)) +endif + makedirs: @if [ ! -d $(BUILD_DIR) ];then $(MKDIR) $(BUILD_DIR);fi @if [ ! -d $(B) ];then $(MKDIR) $(B);fi