[dpdk-dev,4/4] rte.extvars.mk: allow user to override RTE_SDK_BIN

Message ID 1405914461-19335-5-git-send-email-mhall@mhcomputing.net (mailing list archive)
State Rejected, archived
Headers

Commit Message

Matthew Hall July 21, 2014, 3:47 a.m. UTC
Without this patch it is impossible to compile the examples if you have
compiled the DPDK into the $(RTE_SDK)/build directory, or any other one
besides $(RTE_SDK)/$(RTE_TARGET).

Signed-off-by: Matthew Hall <mhall@mhcomputing.net>
---
 mk/rte.extvars.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon July 21, 2014, 2:31 p.m. UTC | #1
Hi,

2014-07-20 20:47, Matthew Hall:
> Without this patch it is impossible to compile the examples if you have
> compiled the DPDK into the $(RTE_SDK)/build directory, or any other one
> besides $(RTE_SDK)/$(RTE_TARGET).

Please, could you explain why is it impossible in your case?

The standard usage is:
	make T=x86_64-native-linuxapp-gcc install
	make T=x86_64-native-linuxapp-gcc examples O=x86_64-native-linuxapp-gcc/examples

If you don't want to use install mode, you can build like this:
	make config T=x86_64-native-linuxapp-gcc
	make
	make -C examples RTE_SDK=$(pwd) RTE_TARGET=build O=$(readlink -m build/examples)

> --- a/mk/rte.extvars.mk
> +++ b/mk/rte.extvars.mk
> -RTE_SDK_BIN := $(RTE_SDK)/$(RTE_TARGET)
> +RTE_SDK_BIN ?= $(RTE_SDK)/$(RTE_TARGET)

I don't understand why this change could help.
You can even use this:
	make -C examples RTE_SDK=$(pwd) RTE_SDK_BIN=$(pwd)/build O=$(readlink -m build/examples)
without the patch because command line override variables.

Note that O= is optional.
  

Patch

diff --git a/mk/rte.extvars.mk b/mk/rte.extvars.mk
index 3e5a990..fc583ce 100644
--- a/mk/rte.extvars.mk
+++ b/mk/rte.extvars.mk
@@ -51,7 +51,7 @@  endif
 RTE_EXTMK ?= $(RTE_SRCDIR)/Makefile
 export RTE_EXTMK
 
-RTE_SDK_BIN := $(RTE_SDK)/$(RTE_TARGET)
+RTE_SDK_BIN ?= $(RTE_SDK)/$(RTE_TARGET)
 
 #
 # Output files wil go in a separate directory: default output is