Add Makefile target to check for outdated deps

This commit is contained in:
Matthias Beyer 2016-11-30 20:12:22 +01:00
parent 91fca4ba13
commit ae74a179c6

View file

@ -21,6 +21,7 @@ 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)
CHECK_TARGETS=$(foreach x,$(TARGETS),$(x)-check) CHECK_TARGETS=$(foreach x,$(TARGETS),$(x)-check)
CHECK_OUTDATED_TARGETS=$(foreach x,$(TARGETS),$(x)-check-outdated)
all: $(TARGETS) imag-bin all: $(TARGETS) imag-bin
@$(ECHO) "\t[ALL ]" @$(ECHO) "\t[ALL ]"
@ -49,6 +50,10 @@ imag-bin-check:
@$(ECHO) "\t[IMAG ][CHECK ]" @$(ECHO) "\t[IMAG ][CHECK ]"
@$(CARGO) check --manifest-path ./bin/Cargo.toml @$(CARGO) check --manifest-path ./bin/Cargo.toml
imag-bin-check-outdated:
@$(ECHO) "\t[IMAG ][CHECK ]"
@$(CARGO) outdated --manifest-path ./bin/Cargo.toml
release: $(RELEASE_TARGETS) imag-bin-release release: $(RELEASE_TARGETS) imag-bin-release
@$(ECHO) "\t[RELEASE]" @$(ECHO) "\t[RELEASE]"
@ -75,6 +80,8 @@ clean: $(CLEAN_TARGETS) imag-bin-clean
check: $(CHECK_TARGETS) imag-bin-check check: $(CHECK_TARGETS) imag-bin-check
check-outdated: $(CHECK_OUTDATED_TARGETS) imag-bin-check-outdated
$(TARGETS): %: .FORCE $(TARGETS): %: .FORCE
@$(ECHO) "\t[CARGO ]:\t$@" @$(ECHO) "\t[CARGO ]:\t$@"
@$(CARGO) build --manifest-path ./$@/Cargo.toml @$(CARGO) build --manifest-path ./$@/Cargo.toml
@ -109,5 +116,9 @@ $(CHECK_TARGETS): %: .FORCE
@$(ECHO) "\t[CHECK ]:\t$(subst -check,,$@)" @$(ECHO) "\t[CHECK ]:\t$(subst -check,,$@)"
@$(CARGO) check --manifest-path ./$(subst -check,,$@)/Cargo.toml @$(CARGO) check --manifest-path ./$(subst -check,,$@)/Cargo.toml
$(CHECK_OUTDATED_TARGETS): %: .FORCE $(subst -check-outdated,-update,$@)
@$(ECHO) "\t[OUTDATE]:\t$(subst -check-outdated,,$@)"
@$(CARGO) outdated -R --manifest-path ./$(subst -check-outdated,,$@)/Cargo.toml
.FORCE: .FORCE: