add release target
This commit is contained in:
parent
c7430fd2c3
commit
b71b5e8c56
1 changed files with 8 additions and 0 deletions
8
Makefile
8
Makefile
|
@ -13,6 +13,7 @@ BIN_TARGETS=$(patsubst imag-%,,$(BINS))
|
||||||
LIB_TARGETS=$(LIBS)
|
LIB_TARGETS=$(LIBS)
|
||||||
LIB_TARGETS_TEST=$(foreach x,$(subst ./,,$(LIBS)),test-$(x))
|
LIB_TARGETS_TEST=$(foreach x,$(subst ./,,$(LIBS)),test-$(x))
|
||||||
TARGETS=$(BIN_TARGETS) $(LIB_TARGETS)
|
TARGETS=$(BIN_TARGETS) $(LIB_TARGETS)
|
||||||
|
RELEASE_TARGETS=$(foreach x,$(TARGETS),$(x)-release)
|
||||||
INSTALL_TARGETS=$(foreach x,$(BIN_TARGETS),$(x)-install)
|
INSTALL_TARGETS=$(foreach x,$(BIN_TARGETS),$(x)-install)
|
||||||
UPDATE_TARGETS=$(foreach x,$(TARGETS),$(x)-update)
|
UPDATE_TARGETS=$(foreach x,$(TARGETS),$(x)-update)
|
||||||
CLEAN_TARGETS=$(foreach x,$(TARGETS),$(x)-clean)
|
CLEAN_TARGETS=$(foreach x,$(TARGETS),$(x)-clean)
|
||||||
|
@ -20,6 +21,9 @@ CLEAN_TARGETS=$(foreach x,$(TARGETS),$(x)-clean)
|
||||||
all: $(TARGETS)
|
all: $(TARGETS)
|
||||||
@$(ECHO) "\t[ALL ]"
|
@$(ECHO) "\t[ALL ]"
|
||||||
|
|
||||||
|
release: $(RELEASE_TARGETS)
|
||||||
|
@$(ECHO) "\t[RELEASE]
|
||||||
|
|
||||||
bin: $(BIN_TARGETS)
|
bin: $(BIN_TARGETS)
|
||||||
@$(ECHO) "\t[ALLBIN]"
|
@$(ECHO) "\t[ALLBIN]"
|
||||||
|
|
||||||
|
@ -41,6 +45,10 @@ $(TARGETS): %: .FORCE
|
||||||
@$(ECHO) "\t[CARGO ]:\t$@"
|
@$(ECHO) "\t[CARGO ]:\t$@"
|
||||||
@$(CARGO) build --manifest-path ./$@/Cargo.toml
|
@$(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
|
$(LIB_TARGETS_TEST): %: .FORCE
|
||||||
@$(ECHO) "\t[TEST ]:\t$@"
|
@$(ECHO) "\t[TEST ]:\t$@"
|
||||||
@$(CARGO) test --manifest-path ./$(subst test-,,$@)/Cargo.toml
|
@$(CARGO) test --manifest-path ./$(subst test-,,$@)/Cargo.toml
|
||||||
|
|
Loading…
Reference in a new issue