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

Ferruh Yigit ferruh.yigit at intel.com
Fri Nov 27 17:01:03 CET 2015


On Fri, Nov 27, 2015 at 04:40:51PM +0100, Thomas Monjalon wrote:
> 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.
> 

As far as I know only "?=" assignment overridden by command line.

Basic experiment:

# cat Makefile 
A ?= a
B := b
C = c

all:
        @echo $(A) $(B) $(C)

-----

# make
a b c

# A=x B=x C=x make
x b c


ferruh


More information about the dev mailing list