Merge pull request #9 from AMDmi3/makefile

Fix Makefile
This commit is contained in:
Arun Prakash Jana 2016-04-08 07:47:11 +05:30
commit 0ef01a5419

View File

@ -1,30 +1,22 @@
PREFIX=/usr/local PREFIX?= /usr/local
BINDIR=$(PREFIX)/bin BINDIR?= $(PREFIX)/bin
MANDIR=$(PREFIX)/share/man/man1 MANDIR?= $(PREFIX)/share/man/man1
DOCDIR=$(PREFIX)/share/doc/buku DOCDIR?= $(PREFIX)/share/doc/buku
UNAME_S:=$(shell uname -s)
.PHONY: install uninstall .PHONY: install uninstall
install: install:
install -m755 -d $(BINDIR) install -m755 -d $(DESTDIR)$(BINDIR)
install -m755 -d $(MANDIR) install -m755 -d $(DESTDIR)$(MANDIR)
install -m755 -d $(DOCDIR) install -m755 -d $(DESTDIR)$(DOCDIR)
gzip -c buku.1 > buku.1.gz gzip -c buku.1 > buku.1.gz
@if [ "$(UNAME_S)" = "Linux" ]; then\ install -m755 buku $(DESTDIR)$(BINDIR)
install -m755 -t $(BINDIR) buku; \ install -m644 buku.1.gz $(DESTDIR)$(MANDIR)
install -m644 -t $(MANDIR) buku.1.gz; \ install -m644 README.md $(DESTDIR)$(DOCDIR)
install -m644 -t $(DOCDIR) README.md; \
fi
@if [ "$(UNAME_S)" = "Darwin" ]; then\
install -m755 buku $(BINDIR); \
install -m644 buku.1.gz $(MANDIR); \
install -m644 README.md $(DOCDIR); \
fi
rm -f buku.1.gz rm -f buku.1.gz
uninstall: uninstall:
rm -f $(BINDIR)/buku rm -f $(DESTDIR)$(BINDIR)/buku
rm -f $(MANDIR)/buku.1.gz rm -f $(DESTDIR)$(MANDIR)/buku.1.gz
rm -rf $(DOCDIR) rm -rf $(DESTDIR)$(DOCDIR)