added update target
This commit is contained in:
parent
ae1e5d6664
commit
8dd4044009
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_TEST=$(foreach x,$(subst ./,,$(LIBS)),test-$(x))
|
||||
TARGETS=$(BIN_TARGETS) $(LIB_TARGETS)
|
||||
UPDATE_TARGETS=$(foreach x,$(TARGETS),$(x)-update)
|
||||
CLEAN_TARGETS=$(foreach x,$(TARGETS),$(x)-clean)
|
||||
|
||||
all: $(TARGETS)
|
||||
|
@ -26,6 +27,9 @@ lib: $(LIB_TARGETS)
|
|||
|
||||
lib-test: $(LIB_TARGETS_TEST)
|
||||
|
||||
update: $(UPDATE_TARGETS)
|
||||
@$(ECHO) "\t[UPDATE]"
|
||||
|
||||
clean: $(CLEAN_TARGETS)
|
||||
@$(ECHO) "\t[CLEAN ]"
|
||||
|
||||
|
@ -37,6 +41,10 @@ $(LIB_TARGETS_TEST): %: .FORCE
|
|||
@$(ECHO) "\t[TEST ]:\t$@"
|
||||
@$(CARGO) test --manifest-path ./$(subst test-,,$@)/Cargo.toml
|
||||
|
||||
$(UPDATE_TARGETS): %: .FORCE
|
||||
@$(ECHO) "\t[UPDATE]:\t$(subst -update,,$@)"
|
||||
@$(CARGO) update --manifest-path ./$(subst -update,,$@)/Cargo.toml
|
||||
|
||||
$(CLEAN_TARGETS): %: .FORCE
|
||||
@$(ECHO) "\t[CLEAN]:\t$(subst -clean,,$@)"
|
||||
@$(CARGO) clean --manifest-path ./$(subst -clean,,$@)/Cargo.toml
|
||||
|
|
Loading…
Reference in a new issue