From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH v2 1/2] mk: allow use of environment var for make config Date: Wed, 7 Jun 2017 15:06:05 +0530 Message-ID: References: <1495535304-159542-3-git-send-email-david.hunt@intel.com> <1495788764-37652-1-git-send-email-david.hunt@intel.com> <1495788764-37652-2-git-send-email-david.hunt@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: , To: "Hunt, David" Return-path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0089.outbound.protection.outlook.com [104.47.32.89]) by dpdk.org (Postfix) with ESMTP id 923A223B for ; Wed, 7 Jun 2017 11:27:59 +0200 (CEST) In-Reply-To: Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hello David, On Wednesday 07 June 2017 02:09 PM, Hunt, David wrote: > Shreyansh, > > I found an issue (or two) with this part of the patch, and have a > proposed solution. > > 1. RTE_TARGET originally had a different meaning. It was used for making > examples, specifying the target directory of where the SDK was built. > It's not good to re-purpose this for something else, as I'm doing in > this patch. (even though I'm not sure that variable is suitably named in > the first place, but that's a different issue). Even I didn't realize this until you highlighted here. > 2. If we set RTE_TARGET on the environment, we will break the 'make -C > examples/', unless we set RTE_TARGET to be something else (i.e. > 'make -C examples/ RTE_TARGET=build'). One value for making DPDK, > and another for building examples. It's confusing to the user. Agree about re-using RTE_TARGET is breaking existing assumption about its use. > > An alternative patch would be as follows: > > RTE_CONFIG_TEMPLATE := > ifdef T > *-ifeq ("$(origin T)", "command line")* > RTE_CONFIG_TEMPLATE := $(RTE_SRCDIR)/config/defconfig_$(T) > *-endif** > *endif > export RTE_CONFIG_TEMPLATE So, that would mean, user would do either of the following: make T=