simplify makefile targets for slim binaries

This commit is contained in:
c9s 2021-05-08 01:47:20 +08:00
parent 22ee727dc0
commit 7cb425d33d

View File

@ -96,11 +96,14 @@ desktop: desktop-osx
$(DIST_DIR)/$(VERSION): $(DIST_DIR)/$(VERSION):
mkdir -p $(DIST_DIR)/$(VERSION) mkdir -p $(DIST_DIR)/$(VERSION)
$(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-%.tar.gz: $(DIST_DIR)/$(VERSION)/bbgo-slim-$(VERSION)-%.tar.gz: bbgo-slim-% $(DIST_DIR)/$(VERSION)
$(eval BIN_SUFFIX := $(subst bbgo-$(VERSION)-,,$(basename $(basename $(notdir $@))))) tar -C $(BIN_DIR) -cvzf $@ $<
$(eval BIN_NAME := $(subst $(VERSION)-,,$(basename $(basename $(notdir $@))))) ifeq ($(SIGN),1)
$(MAKE) $(BIN_NAME) gpg --yes --detach-sign --armor $@
tar -C $(BIN_DIR) -cvzf $@ $(BIN_NAME) endif
$(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-%.tar.gz: bbgo-% $(DIST_DIR)/$(VERSION)
tar -C $(BIN_DIR) -cvzf $@ $<
ifeq ($(SIGN),1) ifeq ($(SIGN),1)
gpg --yes --detach-sign --armor $@ gpg --yes --detach-sign --armor $@
endif endif