[dpdk-dev] [PATCH 00/10] standard make install

Thomas Monjalon thomas.monjalon at 6wind.com
Wed Dec 2 04:57:46 CET 2015


Following the recent discussions, this is a proposal to have a standard
installation process while keeping compatibility with most of the old
behaviours.
Thank you Mario and Bruce for having submitted other proposals.
I hope there will be a strong consensus for this one.
The doc and pkg/dpdk.spec are not updated yet. There will be a v2.

More details below and in the commit messages.

These variables can be overriden:

prefix ?= /usr/local
exec_prefix ?= $(prefix)
kerneldir ?= $(exec_prefix)/kmod
bindir ?= $(exec_prefix)/bin
sbindir ?= $(exec_prefix)/sbin
libdir ?= $(exec_prefix)/lib
includedir ?= $(prefix)/include/dpdk
datarootdir ?= $(prefix)/share
docdir ?= $(datarootdir)/doc/dpdk
datadir ?= $(datarootdir)/dpdk
sdkdir ?= $(datadir)

All paths are prefixed with $(DESTDIR)

One rule install = install-runtime install-kmod install-sdk
In current behaviour, the doc is not installed by default.

--------

System-wise install example with
    DESTDIR=
    prefix=/usr
    kerneldir=/lib/modules/kver/extra

# make install-runtime
/usr/bin/testpmd
/usr/lib/libethdev*
/usr/lib/librte_*
/usr/sbin/dpdk_nic_bind -> /usr/share/dpdk/tools/dpdk_nic_bind.py
/usr/share/dpdk/.config
/usr/share/dpdk/tools/

# make install-kmod
/lib/modules/kver/extra/

# make install-sdk
/usr/include/dpdk/
/usr/share/dpdk/mk/
/usr/share/dpdk/scripts/
/usr/share/dpdk/include -> /usr/include/dpdk/
/usr/share/dpdk/lib     -> /usr/lib/

# make install-doc
/usr/share/doc/dpdk/api/
/usr/share/doc/dpdk/examples/
/usr/share/doc/dpdk/guides/

--------

Local install example with old (compatible) command:

# make install T=x86_64-native-linuxapp-gcc DESTDIR=install

would be equivalent to:

# make config T=x86_64-native-linuxapp-gcc 0=x86_64-native-linuxapp-gcc
# make O=x86_64-native-linuxapp-gcc
# make install O=x86_64-native-linuxapp-gcc prefix= DESTDIR=install

install/bin/testpmd
install/include/dpdk/
install/kmod/
install/lib/
install/sbin/dpdk_nic_bind -> ../share/dpdk/tools/dpdk_nic_bind.py
install/share/dpdk/.config
install/share/dpdk/include -> install/include/dpdk/
install/share/dpdk/lib     -> install/lib/
install/share/dpdk/mk/
install/share/dpdk/scripts/
install/share/dpdk/tools/

It must be usable to build some applications as before:

# make -C examples/helloworld RTE_SDK=$(readlink -m install) RTE_TARGET=x86_64-native-linuxapp-gcc

The RTE_SDK directory must point to install/share/dpdk with a default install.
RTE_TARGET was used to get the include and lib directories but is useless now.

--------

Thomas Monjalon (10):
  mk: remove multi-target install
  mk: move installation procedure in install rule
  mk: install a standard cutomizable tree
  mk: introduce new install syntax
  mk: split install rule
  mk: install kernel modules
  mk: install binding tool in sbin directory
  mk: install doc
  mk: install examples
  app/proc_info: rename binary with prefix

 app/proc_info/Makefile     |   2 +-
 doc/build-sdk-quick.txt    |  11 ++--
 mk/internal/rte.extvars.mk |   8 +++
 mk/rte.sdkbuild.mk         |  16 ------
 mk/rte.sdkinstall.mk       | 134 +++++++++++++++++++++++++++++++--------------
 mk/rte.sdkroot.mk          |   6 +-
 mk/rte.vars.mk             |   7 ---
 7 files changed, 113 insertions(+), 71 deletions(-)

-- 
2.5.2



More information about the dev mailing list