mk: install doc

The HTML API and HTML/PDF guides may be installed if generated.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
This commit is contained in:
Thomas Monjalon 2015-12-01 23:59:26 +01:00
parent 89fd884597
commit e4552b9cc6

View File

@ -64,6 +64,7 @@ sbindir ?= $(exec_prefix)/sbin
libdir ?= $(exec_prefix)/lib
includedir ?= $(prefix)/include/dpdk
datarootdir ?= $(prefix)/share
docdir ?= $(datarootdir)/doc/dpdk
datadir ?= $(datarootdir)/dpdk
sdkdir ?= $(datadir)
targetdir ?= $(datadir)/$(RTE_TARGET)
@ -107,6 +108,7 @@ else
$(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-runtime
$(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-kmod
$(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-sdk
$(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-doc
@echo Installation in $(DESTDIR)$(prefix)/ complete
endif
@ -142,3 +144,15 @@ install-sdk:
$(Q)cp -a $O/.config $(DESTDIR)$(targetdir)
$(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include)
$(Q)$(call rte_symlink, $(DESTDIR)$(libdir), $(DESTDIR)$(targetdir)/lib)
install-doc:
ifneq ($(wildcard $O/doc),)
$(Q)$(call rte_mkdir, $(DESTDIR)$(docdir))
$(Q)tar -cf - -C $O/doc html --exclude 'html/guides/.*' | \
tar -xf - -C $(DESTDIR)$(docdir) --strip-components=1 \
--keep-newer-files --warning=no-ignore-newer
endif
ifneq ($(wildcard $O/doc/*/*/*pdf),)
$(Q)$(call rte_mkdir, $(DESTDIR)$(docdir)/guides)
$(Q)cp -a $O/doc/*/*/*pdf $(DESTDIR)$(docdir)/guides
endif