mk: optimize directory dependencies
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 24 Mar 2017 13:21:31 +0000 (14:21 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 27 Mar 2017 21:28:43 +0000 (23:28 +0200)
commitfeb9f680cd2c1df3d47bf4c05dc872467176e1e3
treecaef9798533f2249ad24668b4e6d21d247c792a1
parent5b2976c718e0717f5e1b39b50ac71fb2ce80e47c
mk: optimize directory dependencies

Before this patch, the management of dependencies between directories
had several issues:

- the generation of .depdirs, done at configuration is slow: it can take
  more than one minute on some slow targets (usually ~10s on a standard
  PC without -j).

- for instance, it is possible to express a dependency like:
  - app/foo depends on lib/librte_foo
  - and lib/librte_foo depends on app/bar
  But this won't work because the directories are traversed with a
  depth-first algorithm, so we have to choose between doing 'app' before
  or after 'lib'.

- the script depdirs-rule.sh is too complex.

- we cannot use "make -d" for debug, because the output of make is used for
  the generation of .depdirs.

This patch moves the DEPDIRS-* variables in the upper Makefile, making
the dependencies much easier to calculate. A DEPDIRS variable is still
used to process library dependencies in LDLIBS.

After this commit, "make config" is almost immediate.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Robin Jarry <robin.jarry@6wind.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
106 files changed:
MAINTAINERS
app/pdump/Makefile
app/proc_info/Makefile
app/test-crypto-perf/Makefile
app/test-pmd/Makefile
buildtools/depdirs-rule.sh [deleted file]
buildtools/pmdinfogen/Makefile
devtools/test-build.sh
doc/guides/prog_guide/dev_kit_build_system.rst
doc/guides/prog_guide/dev_kit_root_make_help.rst
drivers/crypto/Makefile
drivers/crypto/aesni_gcm/Makefile
drivers/crypto/aesni_mb/Makefile
drivers/crypto/armv8/Makefile
drivers/crypto/kasumi/Makefile
drivers/crypto/null/Makefile
drivers/crypto/openssl/Makefile
drivers/crypto/qat/Makefile
drivers/crypto/scheduler/Makefile
drivers/crypto/snow3g/Makefile
drivers/crypto/zuc/Makefile
drivers/net/Makefile
drivers/net/af_packet/Makefile
drivers/net/bnx2x/Makefile
drivers/net/bnxt/Makefile
drivers/net/bonding/Makefile
drivers/net/cxgbe/Makefile
drivers/net/e1000/Makefile
drivers/net/ena/Makefile
drivers/net/enic/Makefile
drivers/net/fm10k/Makefile
drivers/net/i40e/Makefile
drivers/net/ixgbe/Makefile
drivers/net/mlx4/Makefile
drivers/net/mlx5/Makefile
drivers/net/nfp/Makefile
drivers/net/null/Makefile
drivers/net/pcap/Makefile
drivers/net/qede/Makefile
drivers/net/ring/Makefile
drivers/net/sfc/Makefile
drivers/net/szedata2/Makefile
drivers/net/tap/Makefile
drivers/net/thunderx/Makefile
drivers/net/vhost/Makefile
drivers/net/virtio/Makefile
drivers/net/vmxnet3/Makefile
drivers/net/xenvirt/Makefile
examples/ethtool/Makefile
examples/ethtool/lib/Makefile
lib/Makefile
lib/librte_acl/Makefile
lib/librte_cfgfile/Makefile
lib/librte_cmdline/Makefile
lib/librte_cryptodev/Makefile
lib/librte_distributor/Makefile
lib/librte_eal/Makefile
lib/librte_eal/bsdapp/eal/Makefile
lib/librte_eal/linuxapp/Makefile
lib/librte_eal/linuxapp/eal/Makefile
lib/librte_eal/linuxapp/kni/Makefile
lib/librte_eal/linuxapp/xen_dom0/Makefile
lib/librte_efd/Makefile
lib/librte_ether/Makefile
lib/librte_hash/Makefile
lib/librte_ip_frag/Makefile
lib/librte_jobstats/Makefile
lib/librte_kni/Makefile
lib/librte_kvargs/Makefile
lib/librte_lpm/Makefile
lib/librte_mbuf/Makefile
lib/librte_mempool/Makefile
lib/librte_meter/Makefile
lib/librte_net/Makefile
lib/librte_pdump/Makefile
lib/librte_pipeline/Makefile
lib/librte_port/Makefile
lib/librte_power/Makefile
lib/librte_reorder/Makefile
lib/librte_ring/Makefile
lib/librte_sched/Makefile
lib/librte_table/Makefile
lib/librte_timer/Makefile
lib/librte_vhost/Makefile
mk/internal/rte.depdirs-post.mk [deleted file]
mk/internal/rte.depdirs-pre.mk [deleted file]
mk/rte.app.mk
mk/rte.bsdmodule.mk
mk/rte.extsubdir.mk
mk/rte.gnuconfigure.mk
mk/rte.hostapp.mk
mk/rte.hostlib.mk
mk/rte.install.mk
mk/rte.lib.mk
mk/rte.module.mk
mk/rte.obj.mk
mk/rte.sdkbuild.mk
mk/rte.sdkconfig.mk
mk/rte.sdkdepdirs.mk
mk/rte.sdkroot.mk
mk/rte.shared.mk
mk/rte.subdir.mk
test/cmdline_test/Makefile
test/test-acl/Makefile
test/test-pipeline/Makefile
test/test/Makefile