Skip to content

Commit

Permalink
Merge pull request #2 from brohee/master
Browse files Browse the repository at this point in the history
Update wrt rustc option changes
  • Loading branch information
KokaKiwi committed Apr 22, 2015
2 parents 3d6fac3 + 8dd8052 commit 3068535
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rust.mk
Expand Up @@ -124,7 +124,7 @@ endif

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

Expand Down Expand Up @@ -179,7 +179,8 @@ endif
$$($(1)_NAME): $$($(1)_BUILD_DEPS)
@mkdir -p $$(dir $$($(1)_NAME))
@mkdir -p $$(dir $$($(1)_DEPFILE))
$$(RUSTC) $$(RUSTCFLAGS) $$($(1)_RUSTCFLAGS_BUILD) $$($(1)_RUSTCFLAGS) --dep-info $$($(1)_DEPFILE) $$($(1)_ROOT)
$$(RUSTC) $$(RUSTCFLAGS) $$($(1)_RUSTCFLAGS_BUILD) $$($(1)_RUSTCFLAGS) --emit dep-info -o $$($(1)_DEPFILE) $$($(1)_ROOT)
$$(RUSTC) $$(RUSTCFLAGS) $$($(1)_RUSTCFLAGS_BUILD) $$($(1)_RUSTCFLAGS) $$($(1)_ROOT)
-include $$($(1)_DEPFILE)

### Crate test build rule
Expand All @@ -195,7 +196,8 @@ ifeq ($$($(1)_COMPILE_TEST),1)
$$($(1)_TESTNAME): $$($(1)_BUILD_DEPS)
@mkdir -p $$(dir $$($(1)_TESTNAME))
@mkdir -p $$(dir $$($(1)_DEPFILE_TEST))
@$$(RUSTC) $$(RUSTCFLAGS) $$($(1)_RUSTCFLAGS) --dep-info $$($(1)_DEPFILE_TEST) --test -o $$($(1)_TESTNAME) $$($(1)_ROOT_TEST)
@$$(RUSTC) $$(RUSTCFLAGS) $$($(1)_RUSTCFLAGS) --emit dep-info -o $$($(1)_DEPFILE_TEST) --test $$($(1)_ROOT_TEST)
@$$(RUSTC) $$(RUSTCFLAGS) $$($(1)_RUSTCFLAGS) --test -o $$($(1)_TESTNAME) $$($(1)_ROOT_TEST)
-include $$($(1)_DEPFILE_TEST)

clean_test_$(1):
Expand Down

0 comments on commit 3068535

Please sign in to comment.