diff options
author | Ayush Agarwal <ayush@fastmail.in> | 2021-09-21 01:49:06 +0530 |
---|---|---|
committer | Ayush Agarwal <ayush@fastmail.in> | 2021-09-21 01:49:06 +0530 |
commit | 1c1237330181623393e3eeb9495e831501396290 (patch) | |
tree | 0d2dcb3b3cb329c781aaa0c128181e748adf9cd3 /Makefile | |
parent | 5e8461c85854c581b18fdb3ceb26a2dfb0f152d6 (diff) |
added a makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..85d2f84 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +PROG ?= tessen +PREFIX ?= /usr +DESTDIR ?= +BINDIR ?= $(PREFIX)/bin +BASHCOMPDIR ?= /etc/bash_completion.d +FISHCOMPDIR ?= $(PREFIX)/share/fish/vendor_completions.d + +all: + @echo "$(PROG) is a shell script and doesn't need to be compiled" + @echo "" + @echo "To install it, enter \"make install\"" + @echo "" + +install: + @install -vd "$(DESTDIR)$(BINDIR)" "$(DESTDIR)$(BASHCOMPDIR)" "$(DESTDIR)$(FISHCOMPDIR)" + @install -vm 0755 "$(PROG)" "$(DESTDIR)$(BINDIR)/$(PROG)" + @install -vm 0644 "completion/$(PROG).bash-completion" "$(DESTDIR)$(BASHCOMPDIR)/$(PROG)" + @install -vm 0644 "completion/$(PROG).fish-completion" "$(DESTDIR)$(FISHCOMPDIR)/$(PROG).fish" + @echo + @echo "$(PROG) has been installed succesfully" + @echo + +uninstall: + @rm -f \ + "$(DESTDIR)$(BINDIR)/$(PROG)" \ + "$(DESTDIR)$(BASHCOMPDIR)/$(PROG)" \ + "$(DESTDIR)$(FISHCOMPDIR)/$(PROG).fish" + +.PHONY: install uninstall |