Make "test" a postfix to library targets rather than a prefix
This commit is contained in:
parent
f6dc039554
commit
c5d660d3f7
1 changed files with 2 additions and 2 deletions
4
Makefile
4
Makefile
|
@ -14,7 +14,7 @@ LIBS=$(shell find -maxdepth 1 -name "libimag*" -type d)
|
||||||
BIN_TARGETS=$(patsubst imag-%,,$(BINS))
|
BIN_TARGETS=$(patsubst imag-%,,$(BINS))
|
||||||
BIN_TARGET_TESTS=$(foreach x,$(BIN_TARGETS),$(x)-test)
|
BIN_TARGET_TESTS=$(foreach x,$(BIN_TARGETS),$(x)-test)
|
||||||
LIB_TARGETS=$(LIBS)
|
LIB_TARGETS=$(LIBS)
|
||||||
LIB_TARGETS_TEST=$(foreach x,$(subst ./,,$(LIBS)),test-$(x))
|
LIB_TARGETS_TEST=$(foreach x,$(subst ./,,$(LIBS)),$(x)-test)
|
||||||
TARGETS=$(BIN_TARGETS) $(LIB_TARGETS)
|
TARGETS=$(BIN_TARGETS) $(LIB_TARGETS)
|
||||||
RELEASE_TARGETS=$(foreach x,$(TARGETS),$(x)-release)
|
RELEASE_TARGETS=$(foreach x,$(TARGETS),$(x)-release)
|
||||||
INSTALL_TARGETS=$(foreach x,$(BIN_TARGETS),$(x)-install)
|
INSTALL_TARGETS=$(foreach x,$(BIN_TARGETS),$(x)-install)
|
||||||
|
@ -82,7 +82,7 @@ $(RELEASE_TARGETS): %: .FORCE
|
||||||
|
|
||||||
$(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
|
||||||
|
|
||||||
$(INSTALL_TARGETS): %: .FORCE imag-bin-install
|
$(INSTALL_TARGETS): %: .FORCE imag-bin-install
|
||||||
@$(ECHO) "\t[INSTALL]:\t$(subst -install,,$@)"
|
@$(ECHO) "\t[INSTALL]:\t$(subst -install,,$@)"
|
||||||
|
|
Loading…
Reference in a new issue