add man page to install and uninstall target(s)

This commit is contained in:
Vlad Meșco 2022-11-06 21:39:38 +02:00
parent 6ed530d7fa
commit b61dc479e5
1 changed files with 6 additions and 3 deletions

View File

@ -1,13 +1,16 @@
BINDIR ?= /usr/local/bin
MANDIR ?= /usr/local/man
install:
@echo Installing the executable to $(BINDIR)
@mkdir -p $(BINDIR)
@cp -f bb.sh $(BINDIR)/bb
@chmod 755 $(BINDIR)/bb
@install -D -m 755 bb.sh $(BINDIR)/bb
@echo Installing the man page to $(MANDIR)/man1
@install -D -m 644 bb.1 $(MANDIR)/man1/
uninstall:
@echo Removing the executable from $(BINDIR)
@rm -f $(BINDIR)/bb
@echo Removing the man page from $(MANDIR)
@rm -f $(MANDIR)/man1/bb.1
.PHONY: install uninstall