libdir ?= $(exec_prefix)/lib
includedir ?= $(prefix)/include/dpdk
datarootdir ?= $(prefix)/share
+docdir ?= $(datarootdir)/doc/dpdk
datadir ?= $(datarootdir)/dpdk
sdkdir ?= $(datadir)
targetdir ?= $(datadir)/$(RTE_TARGET)
$(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
$(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