-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (41 loc) · 1.6 KB
/
Makefile
File metadata and controls
48 lines (41 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.PHONY: test install install-local install-system uninstall uninstall-local uninstall-system
# Default prefix for local installation
PREFIX ?= $(HOME)/.local
test:
@bats tests/
# Install to $(PREFIX)
install:
@mkdir -p $(PREFIX)/bin
@mkdir -p $(PREFIX)/lib/mq
@mkdir -p $(PREFIX)/share/bash-completion/completions
@mkdir -p $(PREFIX)/share/grc
@cp bin/mq $(PREFIX)/bin/mq
@cp lib/mq/log.bash $(PREFIX)/lib/mq/log.bash
@cp lib/mq/transform.bash $(PREFIX)/lib/mq/transform.bash
@cp lib/mq/format.bash $(PREFIX)/lib/mq/format.bash
@cp lib/mq/bookmark.bash $(PREFIX)/lib/mq/bookmark.bash
@cp share/bash-completion/completions/mq $(PREFIX)/share/bash-completion/completions/mq
@cp share/grc/conf.mq $(PREFIX)/share/grc/conf.mq
@chmod +x $(PREFIX)/bin/mq
@echo "Installed mq to $(PREFIX)/bin"
@echo "Installed transform.bash to $(PREFIX)/lib/mq"
@echo "Installed bash completion to $(PREFIX)/share/bash-completion/completions"
@echo "Installed grc config to $(PREFIX)/share/grc/conf.mq"
# Install to /usr/local (requires sudo)
install-system:
@$(MAKE) install PREFIX=/usr/local
# Uninstall from $(PREFIX)
uninstall:
@rm -f $(PREFIX)/bin/mq
@rm -rf $(PREFIX)/lib/mq
@rm -f $(PREFIX)/share/bash-completion/completions/mq
@rm -f $(PREFIX)/share/grc/conf.mq
@echo "Removed mq from $(PREFIX)/bin"
@echo "Removed $(PREFIX)/lib/mq"
@echo "Removed bash completion from $(PREFIX)/share/bash-completion/completions"
@echo "Removed grc config from $(PREFIX)/share/grc/conf.mq"
# Uninstall from /usr/local (requires sudo)
uninstall-system:
@$(MAKE) uninstall PREFIX=/usr/local
demo.gif:
@vhs .github/assets/demo.tape