Merge pull request #390 from lz4/installVars

fixed man directory installation (#387)
This commit is contained in:
Yann Collet 2017-08-24 11:45:17 -07:00 committed by GitHub
commit bb0997b3dc

View File

@ -133,24 +133,25 @@ bindir ?= $(exec_prefix)/bin
BINDIR ?= $(bindir)
datarootdir ?= $(PREFIX)/share
mandir ?= $(datarootdir)/man
man1dir ?= $(mandir)/man1
ifneq (,$(filter $(shell uname),OpenBSD FreeBSD NetBSD DragonFly SunOS))
MANDIR ?= $(PREFIX)/man/man1
else
MANDIR ?= $(mandir)
MANDIR ?= $(man1dir)
endif
INSTALL_PROGRAM ?= $(INSTALL) -m 755
INSTALL_DATA ?= $(INSTALL) -m 644
install: lz4$(EXT) lz4c$(EXT)
install: lz4
@echo Installing binaries
@$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/
@$(INSTALL_PROGRAM) lz4 $(DESTDIR)$(BINDIR)/lz4
@ln -sf lz4 $(DESTDIR)$(BINDIR)/lz4c
@ln -sf lz4 $(DESTDIR)$(BINDIR)/lz4cat
@ln -sf lz4 $(DESTDIR)$(BINDIR)/unlz4
@$(INSTALL_PROGRAM) lz4c$(EXT) $(DESTDIR)$(BINDIR)/lz4c
@echo Installing man pages
@$(INSTALL_DATA) lz4.1 $(DESTDIR)$(MANDIR)/lz4.1
@ln -sf lz4.1 $(DESTDIR)$(MANDIR)/lz4c.1