From c7430fd2c336535b76bb06cd414e4447de200c64 Mon Sep 17 00:00:00 2001 From: mario Date: Sat, 27 Aug 2016 12:48:45 +0200 Subject: [PATCH] add install target --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 33fc95f1..eab87537 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) +INSTALL_TARGETS=$(foreach x,$(BIN_TARGETS),$(x)-install) UPDATE_TARGETS=$(foreach x,$(TARGETS),$(x)-update) CLEAN_TARGETS=$(foreach x,$(TARGETS),$(x)-clean) @@ -27,6 +28,9 @@ lib: $(LIB_TARGETS) lib-test: $(LIB_TARGETS_TEST) +install: $(INSTALL_TARGETS) + @$(ECHO) "\t[INSTALL]" + update: $(UPDATE_TARGETS) @$(ECHO) "\t[UPDATE]" @@ -41,6 +45,10 @@ $(LIB_TARGETS_TEST): %: .FORCE @$(ECHO) "\t[TEST ]:\t$@" @$(CARGO) test --manifest-path ./$(subst test-,,$@)/Cargo.toml +$(INSTALL_TARGETS): %: .FORCE + @$(ECHO) "\t[INSTALL]:\t$(subst -install,,$@)" + @$(CARGO) install --force --path ./$(subst -install,,$@) + $(UPDATE_TARGETS): %: .FORCE @$(ECHO) "\t[UPDATE]:\t$(subst -update,,$@)" @$(CARGO) update --manifest-path ./$(subst -update,,$@)/Cargo.toml