2017-05-07 15:28:36 +00:00
|
|
|
DESTDIR =
|
|
|
|
PREFIX = /usr/local
|
|
|
|
|
|
|
|
BASHDIR = /etc/bash_completion.d
|
|
|
|
ZSHDIR = /usr/share/zsh/vendor-completions
|
|
|
|
FISHDIR = /usr/share/fish/completions
|
|
|
|
|
|
|
|
FEATURES ?= default
|
|
|
|
|
2015-02-24 15:48:39 +00:00
|
|
|
|
2016-07-04 11:55:56 +00:00
|
|
|
all: target/release/exa
|
2017-05-07 15:28:36 +00:00
|
|
|
build: target/release/exa
|
2015-02-24 15:48:39 +00:00
|
|
|
|
2017-05-07 15:28:36 +00:00
|
|
|
target/release/exa:
|
|
|
|
cargo build --release --features "${ENABLE_FEATURES}"
|
2015-02-24 15:48:39 +00:00
|
|
|
|
2017-05-07 15:28:36 +00:00
|
|
|
install: install-exa install-man
|
2015-06-07 13:35:56 +00:00
|
|
|
|
2017-05-07 15:28:36 +00:00
|
|
|
install-exa: target/release/exa
|
2016-07-04 17:02:22 +00:00
|
|
|
install -m755 -- target/release/exa "$(DESTDIR)$(PREFIX)/bin/"
|
2017-05-07 15:28:36 +00:00
|
|
|
|
|
|
|
install-man:
|
|
|
|
install -dm755 -- "$(DESTDIR)$(PREFIX)/bin/" "$(DESTDIR)$(PREFIX)/share/man/man1/"
|
2016-07-04 11:48:07 +00:00
|
|
|
install -m644 -- contrib/man/exa.1 "$(DESTDIR)$(PREFIX)/share/man/man1/"
|
2015-02-24 15:48:39 +00:00
|
|
|
|
2017-05-07 15:28:36 +00:00
|
|
|
install-bash-completions:
|
|
|
|
install -m644 -- contrib/completions.bash "$(BASHDIR)/exa"
|
|
|
|
|
|
|
|
install-zsh-completions:
|
|
|
|
install -m644 -- contrib/completions.zsh "$(ZSHDIR)/_exa"
|
|
|
|
|
|
|
|
install-fish-completions:
|
|
|
|
install -m644 -- contrib/completions.fish "$(FISHDIR)/exa.fish"
|
|
|
|
|
|
|
|
|
2016-07-04 11:48:07 +00:00
|
|
|
uninstall:
|
2017-05-07 15:28:36 +00:00
|
|
|
-rm -- "$(DESTDIR)$(PREFIX)/share/man/man1/exa.1"
|
|
|
|
-rm -- "$(DESTDIR)$(PREFIX)/bin/exa"
|
|
|
|
-rm -- "$(BASHDIR)/exa"
|
|
|
|
-rm -- "$(ZSHDIR)/_exa"
|
|
|
|
-rm -- "$(FISHDIR)/exa.fish"
|
2015-02-24 15:48:39 +00:00
|
|
|
|
2016-07-04 11:50:08 +00:00
|
|
|
clean:
|
2017-05-07 15:28:36 +00:00
|
|
|
cargo clean
|
|
|
|
|
|
|
|
|
|
|
|
preview-man:
|
|
|
|
nroff -man contrib/man/exa.1 | less
|
|
|
|
|
2015-02-24 15:48:39 +00:00
|
|
|
|
2017-05-07 15:28:36 +00:00
|
|
|
.PHONY: all build install-exa install-man preview-man \
|
|
|
|
install-bash-completions install-zsh-completions install-fish-completions \
|
|
|
|
clean uninstall
|