From b71b5e8c56f3a76fa7801ad309a44360c2f89567 Mon Sep 17 00:00:00 2001 From: mario Date: Sat, 27 Aug 2016 13:15:32 +0200 Subject: [PATCH] add release target --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index eab87537..35bc560f 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ BIN_TARGETS=$(patsubst imag-%,,$(BINS)) LIB_TARGETS=$(LIBS) LIB_TARGETS_TEST=$(foreach x,$(subst ./,,$(LIBS)),test-$(x)) TARGETS=$(BIN_TARGETS) $(LIB_TARGETS) +RELEASE_TARGETS=$(foreach x,$(TARGETS),$(x)-release) INSTALL_TARGETS=$(foreach x,$(BIN_TARGETS),$(x)-install) UPDATE_TARGETS=$(foreach x,$(TARGETS),$(x)-update) CLEAN_TARGETS=$(foreach x,$(TARGETS),$(x)-clean) @@ -20,6 +21,9 @@ CLEAN_TARGETS=$(foreach x,$(TARGETS),$(x)-clean) all: $(TARGETS) @$(ECHO) "\t[ALL ]" +release: $(RELEASE_TARGETS) + @$(ECHO) "\t[RELEASE] + bin: $(BIN_TARGETS) @$(ECHO) "\t[ALLBIN]" @@ -41,6 +45,10 @@ $(TARGETS): %: .FORCE @$(ECHO) "\t[CARGO ]:\t$@" @$(CARGO) build --manifest-path ./$@/Cargo.toml +$(RELEASE_TARGETS): %: .FORCE + @$(ECHO) "\t[RELEASE]:\t$(subst -release,,$@)" + @$(CARGO) build --release --manifest-path ./$(subst -release,,$@)/Cargo.toml + $(LIB_TARGETS_TEST): %: .FORCE @$(ECHO) "\t[TEST ]:\t$@" @$(CARGO) test --manifest-path ./$(subst test-,,$@)/Cargo.toml