1
1
DESTDIR =
2
2
PREFIX = /usr/local
3
3
4
- BASHDIR = /etc/bash_completion.d
4
+ BASHDIR = $( PREFIX ) /etc/bash_completion.d
5
5
ZSHDIR = /usr/share/zsh/vendor-completions
6
- FISHDIR = /usr/ share/fish/completions
6
+ FISHDIR = $( PREFIX ) / share/fish/vendor_completions.d
7
7
8
8
FEATURES ?= default
9
9
@@ -12,7 +12,7 @@ all: target/release/exa
12
12
build : target/release/exa
13
13
14
14
target/release/exa :
15
- cargo build --release --features " ${ENABLE_FEATURES} "
15
+ cargo build --release --no-default- features --features " $( FEATURES ) "
16
16
17
17
install : install-exa install-man
18
18
@@ -32,22 +32,43 @@ install-zsh-completions:
32
32
install-fish-completions :
33
33
install -m644 -- contrib/completions.fish " $( FISHDIR) /exa.fish"
34
34
35
-
36
35
uninstall :
37
- -rm -- " $( DESTDIR) $( PREFIX) /share/man/man1/exa.1"
38
- -rm -- " $( DESTDIR) $( PREFIX) /bin/exa"
39
- -rm -- " $( BASHDIR) /exa"
40
- -rm -- " $( ZSHDIR) /_exa"
41
- -rm -- " $( FISHDIR) /exa.fish"
36
+ -rm -f - - " $( DESTDIR) $( PREFIX) /share/man/man1/exa.1"
37
+ -rm -f - - " $( DESTDIR) $( PREFIX) /bin/exa"
38
+ -rm -f - - " $( BASHDIR) /exa"
39
+ -rm -f - - " $( ZSHDIR) /_exa"
40
+ -rm -f - - " $( FISHDIR) /exa.fish"
42
41
43
42
clean :
44
43
cargo clean
45
44
46
-
47
45
preview-man :
48
- nroff -man contrib/man/exa.1 | less
49
-
50
-
51
- .PHONY : all build install-exa install-man preview-man \
46
+ man contrib/man/exa.1
47
+
48
+ help :
49
+ @echo ' Available make targets:'
50
+ @echo ' all - build exa (default)'
51
+ @echo ' build - build exa'
52
+ @echo ' clean - run `cargo clean`'
53
+ @echo ' install - build and install exa and manpage'
54
+ @echo ' install-exa - build and install exa'
55
+ @echo ' install-man - install the manpage'
56
+ @echo ' uninstall - uninstall fish, manpage, and completions'
57
+ @echo ' preview-man - preview the manpage without installing'
58
+ @echo ' help - print this help'
59
+ @echo
60
+ @echo ' install-bash-completions - install bash completions into $$BASHDIR'
61
+ @echo ' install-zsh-completions - install zsh completions into $$ZSHDIR'
62
+ @echo ' install-fish-completions - install fish completions into $$FISHDIR'
63
+ @echo
64
+ @echo ' Variables:'
65
+ @echo ' DESTDIR - A path that' \' ' s prepended to installation paths (default: "")'
66
+ @echo ' PREFIX - The installation prefix for everything except zsh completions (default: /usr/local)'
67
+ @echo ' BASHDIR - The directory to install bash completions in (default: $$PREFIX/etc/bash_completion.d)'
68
+ @echo ' ZSHDIR - The directory to install zsh completions in (default: /usr/share/zsh/vendor-completions)'
69
+ @echo ' FISHDIR - The directory to install fish completions in (default: $$PREFIX/share/fish/vendor_completions.d)'
70
+ @echo ' FEATURES - The cargo feature flags to use. Set to an empty string to disable git support'
71
+
72
+ .PHONY : all build target/release/exa install-exa install-man preview-man \
52
73
install-bash-completions install-zsh-completions install-fish-completions \
53
- clean uninstall
74
+ clean uninstall help
0 commit comments