[dpdk-dev] [PATCH 7/7] mk: Add hierarchy-file support (linux mod)

Thomas Monjalon thomas.monjalon at 6wind.com
Fri Nov 27 16:40:51 CET 2015


2015-09-22 09:56, Panu Matilainen:
> On 09/18/2015 11:33 PM, Mario Carrillo wrote:
> > +MOD_DIR := $(DESTDIR)/lib/modules
> > +KERNEL_DIR := $(shell uname -r)/extra
> 
> Please don't assume one is always building for the running kernel. 
> Defaulting around uname -r is perfectly reasonable, but there needs to 
> be a way to override it from the cli. For example rte.vars.mk has this:
> 
> # can be overriden by make command line or exported environment variable
> RTE_KERNELDIR ?= /lib/modules/$(shell uname -r)/build

For info, the ?= operator is a way to give a default value after having
included other makefiles which may set a different value.
Both ?= and := (or simply =) are overriden by the command line.
Only "override VAR =" will not be overriden by the command line.



More information about the dev mailing list