Fixed man installation on MacOs (#81)
This commit is contained in:
parent
a518735cb8
commit
dd97143aeb
1 changed files with 6 additions and 4 deletions
10
Makefile
10
Makefile
|
@ -5,9 +5,11 @@ CFLAGS_DEBUG = -Wall -Wextra
|
||||||
ifeq ($(shell uname), Linux)
|
ifeq ($(shell uname), Linux)
|
||||||
PREFIX = /usr/bin
|
PREFIX = /usr/bin
|
||||||
LIBDIR = /usr/lib
|
LIBDIR = /usr/lib
|
||||||
|
MANDIR = /usr/share/man/man1
|
||||||
else ifeq ($(shell uname), Darwin)
|
else ifeq ($(shell uname), Darwin)
|
||||||
PREFIX = /usr/local/bin
|
PREFIX = /usr/local/bin
|
||||||
LIBDIR = /usr/local/lib
|
LIBDIR = /usr/local/lib
|
||||||
|
MANDIR = /usr/local/share/man/man1
|
||||||
endif
|
endif
|
||||||
CC = cc
|
CC = cc
|
||||||
MAN_COMPILER = pandoc
|
MAN_COMPILER = pandoc
|
||||||
|
@ -22,14 +24,14 @@ debug:
|
||||||
|
|
||||||
install: build man
|
install: build man
|
||||||
cp $(NAME) $(DESTDIR)$(PREFIX)/$(NAME)
|
cp $(NAME) $(DESTDIR)$(PREFIX)/$(NAME)
|
||||||
ls $(DESTDIR)/$(LIBDIR)/ 2> /dev/null || mkdir $(DESTDIR)/$(LIBDIR)/
|
ls $(DESTDIR)$(LIBDIR)/ > /dev/null || mkdir $(DESTDIR)$(LIBDIR)/
|
||||||
cp res/* $(DESTDIR)/$(LIBDIR)/
|
cp res/* $(DESTDIR)$(LIBDIR)/
|
||||||
cp ./$(NAME).1.gz $(DESTDIR)/usr/share/man/man1/
|
cp ./$(NAME).1.gz $(DESTDIR)$(MANDIR)/
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(DESTDIR)$(PREFIX)/$(NAME)
|
rm -f $(DESTDIR)$(PREFIX)/$(NAME)
|
||||||
rm -rf $(DESTDIR)/$(LIBDIR)/
|
rm -rf $(DESTDIR)/$(LIBDIR)/
|
||||||
rm -rf $(DESTDIR)/usr/share/man/man1/$(NAME).1.gz
|
rm -rf $(DESTDIR)$(MANDIR)/$(NAME).1.gz
|
||||||
|
|
||||||
termux: build
|
termux: build
|
||||||
cp $(NAME) $(DESTDIR)/data/data/com.termux/files$(PREFIX)/$(NAME)
|
cp $(NAME) $(DESTDIR)/data/data/com.termux/files$(PREFIX)/$(NAME)
|
||||||
|
|
Loading…
Reference in a new issue