mirror of
https://github.com/Llewellynvdm/exa.git
synced 2025-01-13 17:02:58 +00:00
Improve build rules
Signed-off-by: Mattias Andrée <maandree@kth.se>
This commit is contained in:
parent
3d966e8184
commit
d894a3a475
25
Makefile
25
Makefile
@ -1,21 +1,18 @@
|
|||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
|
||||||
BUILD = target/release/exa
|
CARGOFLAGS = --no-default-features
|
||||||
|
|
||||||
$(BUILD):
|
all: target/release/exa
|
||||||
|
|
||||||
|
build: CARGOFLAGS=
|
||||||
|
build: all
|
||||||
|
build-no-git: all
|
||||||
|
|
||||||
|
target/release/exa:
|
||||||
if test -n "$$(echo "$$CC" | cut -d \ -f 1)"; then \
|
if test -n "$$(echo "$$CC" | cut -d \ -f 1)"; then \
|
||||||
env CC="$$(echo "$$CC" | cut -d \ -f 1)" cargo build --release; \
|
env CC="$$(echo "$$CC" | cut -d \ -f 1)" cargo build --release $(CARGOFLAGS); \
|
||||||
else\
|
else\
|
||||||
env -u CC cargo build --release; \
|
env -u CC cargo build --release $(CARGOFLAGS); \
|
||||||
fi
|
|
||||||
|
|
||||||
build: $(BUILD)
|
|
||||||
|
|
||||||
build-no-git:
|
|
||||||
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
|
fi
|
||||||
|
|
||||||
install: target/release/exa
|
install: target/release/exa
|
||||||
@ -33,4 +30,4 @@ uninstall:
|
|||||||
clean:
|
clean:
|
||||||
-rm -rf target
|
-rm -rf target
|
||||||
|
|
||||||
.PHONY: install uninstall clean
|
.PHONY: all build build-no-git install uninstall clean
|
||||||
|
Loading…
Reference in New Issue
Block a user