From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B8C5823B for ; Wed, 7 Jun 2017 10:40:04 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jun 2017 01:40:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,310,1493708400"; d="scan'208,217";a="1138814014" Received: from dhunt5-mobl.ger.corp.intel.com (HELO [10.237.221.55]) ([10.237.221.55]) by orsmga001.jf.intel.com with ESMTP; 07 Jun 2017 01:39:59 -0700 To: Shreyansh Jain 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> Cc: dev@dpdk.org, thomas@monjalon.net From: "Hunt, David" Message-ID: Date: Wed, 7 Jun 2017 09:39:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1495788764-37652-2-git-send-email-david.hunt@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 1/2] mk: allow use of environment var for make config X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2017 08:40:05 -0000 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). 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. 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 instead of setting 'RTE_TARGET' on in the environment, we set 'T' instead. This allows 'T' to come from the command line OR an environment variable. It resolves the 'make examples' issue, and everything else works as it did before, 'make install', etc. It seems to me to be a cleaner solution for this. What do you think? If it's OK with you, I'll submit a v3 (the 'make defconfig' part of the patchset will remain the same as v2). Rgds, Dave. On 26/5/2017 9:52 AM, David Hunt wrote: > Users can now set RTE_TARGET in their environment and use > 'make config' without T=template. > > If RTE_TARGET is set in the user's environment, and if T= > is not used, 'make config' will use $RTE_TARGET. > > Signed-off-by: David Hunt > --- > mk/rte.sdkroot.mk | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk > index 2843b7d..9bdaf20 100644 > --- a/mk/rte.sdkroot.mk > +++ b/mk/rte.sdkroot.mk > @@ -63,6 +63,8 @@ ifdef T > ifeq ("$(origin T)", "command line") > RTE_CONFIG_TEMPLATE := $(RTE_SRCDIR)/config/defconfig_$(T) > endif > +else ifdef RTE_TARGET > +RTE_CONFIG_TEMPLATE := $(RTE_SRCDIR)/config/defconfig_$(RTE_TARGET) > endif > export RTE_CONFIG_TEMPLATE >