From 8dd40440098a3789692df8291f56166e2976d293 Mon Sep 17 00:00:00 2001 From: Mario Krehl Date: Wed, 24 Aug 2016 16:49:08 +0200 Subject: [PATCH] added update target --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 7733b506..33fc95f1 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) +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