Add option to create archive of build product

This commit is contained in:
Tim Angus 2013-03-27 14:35:11 +00:00
parent 838fcf45cb
commit 2b3c5492c7

View file

@ -1209,10 +1209,16 @@ endif
@echo "" @echo ""
ifneq ($(TARGETS),) ifneq ($(TARGETS),)
ifndef DEBUG_MAKEFILE ifndef DEBUG_MAKEFILE
@$(MAKE) $(TARGETS) V=$(V) @$(MAKE) $(TARGETS) $(B).zip V=$(V)
endif endif
endif endif
$(B).zip: $(TARGETS)
ifdef ARCHIVE
@rm -f $@
@(cd $(B) && zip -r9 ../../$@ $(NAKED_TARGETS))
endif
makedirs: makedirs:
@if [ ! -d $(BUILD_DIR) ];then $(MKDIR) $(BUILD_DIR);fi @if [ ! -d $(BUILD_DIR) ];then $(MKDIR) $(BUILD_DIR);fi
@if [ ! -d $(B) ];then $(MKDIR) $(B);fi @if [ ! -d $(B) ];then $(MKDIR) $(B);fi