Work around a bug in cargo

Signed-off-by: Mattias Andrée <maandree@kth.se>
This commit is contained in:
Mattias Andrée 2016-07-04 13:38:47 +02:00
parent a77230a6e8
commit 54ed5f6756

View File

@ -4,13 +4,21 @@ BUILD = target/release/exa
$(BUILD):
@which rustc > /dev/null || { echo "exa requires Rust to compile. For installation instructions, please visit http://rust-lang.org/"; exit 1; }
cargo build --release
if test -n "$$(echo "$$CC" | cut -d \ -f 1)"; then \
env CC="$$(echo "$$CC" | cut -d \ -f 1)" cargo build --release; \
else\
env -u CC cargo build --release; \
fi
build: $(BUILD)
build-no-git:
@which rustc > /dev/null || { echo "exa requires Rust to compile. For installation instructions, please visit http://rust-lang.org/"; exit 1; }
cargo build --release --no-default-features
if test -n "$$(echo "$$CC" | cut -d \ -f 1)"; then \
env CC="$$(echo "$$CC" | cut -d \ -f 1)" cargo build --release --no-default-features; \
else\
env -u CC cargo build --release --no-default-features; \
fi
INSTALL = $(PREFIX)/bin/exa