diff options
author | Bruce Richardson <bruce.richardson@intel.com> | 2019-03-27 13:58:05 +0000 |
---|---|---|
committer | Thomas Monjalon <thomas@monjalon.net> | 2019-03-30 01:12:15 +0100 |
commit | e9c659426416c95c4469b16e6bcc7700f1898278 (patch) | |
tree | 6cf3bb6af1365ad059548bd90b17f2e033f51429 /examples/vhost_scsi | |
parent | ff1e35fb5f8330f89d13f58c9fb767b5bd188940 (diff) | |
download | dpdk-e9c659426416c95c4469b16e6bcc7700f1898278.zip dpdk-e9c659426416c95c4469b16e6bcc7700f1898278.tar.gz dpdk-e9c659426416c95c4469b16e6bcc7700f1898278.tar.xz |
examples: detect default build directory
Most examples have in their makefiles a default RTE_TARGET directory to be
used in case RTE_TARGET is not set. Rather than just using a hard-coded
default, we can instead detect what the build directory is relative to
RTE_SDK directory.
This fixes a potential issue for anyone who continues to build using
"make install T=x86_64-native-linuxapp-gcc" and skips setting RTE_TARGET
explicitly, instead relying on the fact that they were building in a
directory which corresponded to the example default path - which was
changed to "x86_64-native-linux-gcc" by commit 218c4e68c1d9 ("mk: use
linux and freebsd in config names").
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'examples/vhost_scsi')
-rw-r--r-- | examples/vhost_scsi/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile index 58ff7a2..0a3450b 100644 --- a/examples/vhost_scsi/Makefile +++ b/examples/vhost_scsi/Makefile @@ -46,8 +46,8 @@ ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif -# Default target, can be overridden by command line or environment -RTE_TARGET ?= x86_64-native-linux-gcc +# Default target, detect a build directory, by looking for a path with a .config +RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) include $(RTE_SDK)/mk/rte.vars.mk |