From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH 7/7] mk: Add hierarchy-file support (linux mod) Date: Fri, 27 Nov 2015 16:01:03 +0000 Message-ID: <20151127160103.GA32227@sivlogin002.ir.intel.com> References: <1442608390-12537-1-git-send-email-mario.alfredo.c.arevalo@intel.com> <1442608390-12537-8-git-send-email-mario.alfredo.c.arevalo@intel.com> <5600FB8B.6070909@redhat.com> <7380042.Av6xXtCM9v@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Thomas Monjalon Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 3831B5683 for ; Fri, 27 Nov 2015 17:17:49 +0100 (CET) Content-Disposition: inline In-Reply-To: <7380042.Av6xXtCM9v@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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