Skip to content

Commit

Permalink
Enable modifying <crate>_ROOT_TEST variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
KokaKiwi committed Apr 23, 2014
1 parent 31d110e commit 322053b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -190,6 +190,12 @@ Default: Determined with existing file (`main.rs` or `lib.rs`) in crate dir.

Specify the crate root file (entry file when compiling the crate).

### `<crate>_ROOT_TEST` ###

Default: Crate root file

Specify the crate root file used for tests.

### `<crate>_TYPE` ###

Default: Determined with crate root (`main.rs` or `lib.rs`).
Expand Down
2 changes: 1 addition & 1 deletion rust.mk
Expand Up @@ -120,7 +120,7 @@ $$(error Unknown crate type '$$($(1)_TYPE)' for '$(1)')
endif

### Crate common variables (after type resolving)
$(1)_ROOT_TEST = $$($(1)_ROOT)
$(1)_ROOT_TEST ?= $$($(1)_ROOT)
$(1)_NAMES = $$(addprefix $$($(1)_PREFIX),$$(shell $$(RUSTC) $$(RUSTCFLAGS) $$($(1)_RUSTCFLAGS) --crate-file-name $$($(1)_ROOT)))
$(1)_NAME = $$(firstword $$($(1)_NAMES))

Expand Down

0 comments on commit 322053b

Please sign in to comment.