summaryrefslogtreecommitdiff
path: root/libopeniscsiusr
diff options
context:
space:
mode:
authorLee Duncan <lduncan@suse.com>2022-04-04 13:17:48 -0700
committerLee Duncan <lduncan@suse.com>2022-04-04 13:17:48 -0700
commitd35a8a65628cb636ac266e0ac7984be2ad353a66 (patch)
tree035ffb603378a288eaff4dfee698e8ee7de627ae /libopeniscsiusr
parent8f8d8fd7dcdd365b1127a382848df953e95efe37 (diff)
downloadopen-iscsi-d35a8a65628cb636ac266e0ac7984be2ad353a66.tar.gz
Build: libopeniscsiusr install should install docs
We go to all the trouble to generate man pages for all the libopeniscsiusr routines, but we do not install them, so add installing them as part of the "install" target, ut break up that target into 3 sub-targets (install_libs, install_docs, and install_pkg_config) so that callers can choose subsets if they wish.
Diffstat (limited to 'libopeniscsiusr')
-rw-r--r--libopeniscsiusr/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/libopeniscsiusr/Makefile b/libopeniscsiusr/Makefile
index f6b5b5b..c9c3f50 100644
--- a/libopeniscsiusr/Makefile
+++ b/libopeniscsiusr/Makefile
@@ -26,6 +26,7 @@ endif
INCLUDE_DIR ?= $(prefix)/include
PKGCONF_DIR ?= $(LIB_DIR)/pkgconfig
+MAN_DIR = $(prefix)/share/man
PKG_CONFIG = /usr/bin/pkg-config
SED = /usr/bin/sed
@@ -81,13 +82,21 @@ check: $(LIBS) $(TESTS)
sudo env LD_LIBRARY_PATH=$(LIBISCSI_USR_DIR) TESTS="$(TESTS)" \
tests/runtest.sh || exit 1;
-install: $(LIBS) $(LIBS_MAJOR)
+install: install_libs install_docs install_pkg_files
+
+install_libs: $(LIBS) $(LIBS_MAJOR)
$(INSTALL) -d $(DESTDIR)/$(LIB_DIR)/
$(INSTALL) -d $(DESTDIR)/$(INCLUDE_DIR)/
$(INSTALL) $(LIBS) $(DESTDIR)$(LIB_DIR)/
ln -sf $(LIBS) $(DESTDIR)/$(LIB_DIR)/$(DEVLIB)
ln -sf $(LIBS) $(DESTDIR)/$(LIB_DIR)/$(LIBS_MAJOR)
$(INSTALL) $(HEADERS) $(DESTDIR)$(INCLUDE_DIR)/
+
+install_docs: doc
+ $(INSTALL) -d $(DESTDIR)$(MAN_DIR)/man3
+ $(INSTALL) -m 644 docs/man/*.gz $(DESTDIR)$(MAN_DIR)/man3/
+
+install_pkg_files:
$(INSTALL) -m 644 -D $(PKGFILE).in $(DESTDIR)$(PKGCONF_DIR)/$(PKGFILE)
perl -i -pe 's|__VERSION__|$(LIBNVME_VERSION)|g' \
$(DESTDIR)$(PKGCONF_DIR)/$(PKGFILE)