summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorShenghui Wang <shhuiw@foxmail.com>2019-04-26 11:35:42 +0800
committerJens Axboe <axboe@kernel.dk>2019-04-26 06:42:42 -0600
commit6cd873cec62a9f97923f21434fbb458151900849 (patch)
tree7faac11bedf2b1226221aa9272826e0d8a8dc6f8 /Makefile
parentcb1e01af25e9e971f3e392faa581689990df95cc (diff)
liburing: install man pages on running 'make install'
Install man pages on running 'make install', so that we can run commands like 'man 2 io_uring_setup'. Signed-off-by: Shenghui Wang <shhuiw@foxmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e78c990..cbc3504 100644
--- a/Makefile
+++ b/Makefile
@@ -4,9 +4,11 @@ VERSION=$(shell awk '/Version:/ { print $$2 }' $(SPECFILE))
TAG = $(NAME)-$(VERSION)
RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm")
+INSTALL=install
prefix=/usr
includedir=$(prefix)/include
libdir=$(prefix)/lib
+mandir=$(prefix)/man
default: all
@@ -33,6 +35,8 @@ endif
install:
@$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir)
+ $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man2
+ $(INSTALL) -m 644 man/*.2 $(DESTDIR)$(mandir)/man2
clean:
@rm -f config-host.mak config-host.h cscope.out