From 7cb425d33d339599418df685b65825826fd600d3 Mon Sep 17 00:00:00 2001 From: c9s Date: Sat, 8 May 2021 01:47:20 +0800 Subject: [PATCH] simplify makefile targets for slim binaries --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c5a2d637c..84d758641 100644 --- a/Makefile +++ b/Makefile @@ -96,11 +96,14 @@ desktop: desktop-osx $(DIST_DIR)/$(VERSION): mkdir -p $(DIST_DIR)/$(VERSION) -$(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-%.tar.gz: - $(eval BIN_SUFFIX := $(subst bbgo-$(VERSION)-,,$(basename $(basename $(notdir $@))))) - $(eval BIN_NAME := $(subst $(VERSION)-,,$(basename $(basename $(notdir $@))))) - $(MAKE) $(BIN_NAME) - tar -C $(BIN_DIR) -cvzf $@ $(BIN_NAME) +$(DIST_DIR)/$(VERSION)/bbgo-slim-$(VERSION)-%.tar.gz: bbgo-slim-% $(DIST_DIR)/$(VERSION) + tar -C $(BIN_DIR) -cvzf $@ $< +ifeq ($(SIGN),1) + gpg --yes --detach-sign --armor $@ +endif + +$(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-%.tar.gz: bbgo-% $(DIST_DIR)/$(VERSION) + tar -C $(BIN_DIR) -cvzf $@ $< ifeq ($(SIGN),1) gpg --yes --detach-sign --armor $@ endif