From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH v3 2/3] mk: allow use of environment var for template Date: Mon, 12 Jun 2017 14:07:35 +0530 Message-ID: <20170612083734.GB16518@jerin> References: <1495788764-37652-2-git-send-email-david.hunt@intel.com> <1496846277-280267-1-git-send-email-david.hunt@intel.com> <1496846277-280267-3-git-send-email-david.hunt@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, thomas@monjalon.net, shreyansh.jain@nxp.com To: David Hunt Return-path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0059.outbound.protection.outlook.com [104.47.42.59]) by dpdk.org (Postfix) with ESMTP id 9AABF9E3 for ; Mon, 12 Jun 2017 10:37:54 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1496846277-280267-3-git-send-email-david.hunt@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Wed, 7 Jun 2017 15:37:56 +0100 > From: David Hunt > To: dev@dpdk.org > CC: thomas@monjalon.net, shreyansh.jain@nxp.com, David Hunt > > Subject: [dpdk-dev] [PATCH v3 2/3] mk: allow use of environment var for > template > X-Mailer: git-send-email 2.7.4 > > Added new environment variable RTE_TEMPLATE which is an additional > variable that can be set in the users environment. This maps on to the > existing 'T' command line variable typically used when 'make config' > or 'make install' is invoked. > > So, instead of typing 'make config T=x86_64-native-linuxapp-gcc', the user > can now do 'export RTE_TEMPLATE=x86_64-native-linuxapp-gcc' followed by > 'make config'. If the user instead chooses to 'make install', this will > do the configure, build, and install in one step. > > Signed-off-by: David Hunt > Acked-by: Shreyansh Jain Acked-by: Jerin Jacob > --- > mk/rte.sdkinstall.mk | 4 ++++ > mk/rte.sdkroot.mk | 4 ++++ > 2 files changed, 8 insertions(+) > > diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk > index dbac2a2..a464b01 100644 > --- a/mk/rte.sdkinstall.mk > +++ b/mk/rte.sdkinstall.mk > @@ -47,6 +47,10 @@ ifneq ($(MAKECMDGOALS),pre_install) > include $(RTE_SDK)/mk/rte.vars.mk > endif > > +ifndef T > +T := $(RTE_TEMPLATE) > +endif > + > ifdef T # defaults with T= will install an almost flat staging tree > export prefix ?= > kerneldir ?= $(prefix)/kmod > diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk > index 076a2d7..a560230 100644 > --- a/mk/rte.sdkroot.mk > +++ b/mk/rte.sdkroot.mk > @@ -63,6 +63,10 @@ ifdef T > ifeq ("$(origin T)", "command line") > RTE_CONFIG_TEMPLATE := $(RTE_SRCDIR)/config/defconfig_$(T) > endif > +else > +ifdef RTE_TEMPLATE > +RTE_CONFIG_TEMPLATE := $(RTE_SRCDIR)/config/defconfig_$(RTE_TEMPLATE) > +endif > endif > export RTE_CONFIG_TEMPLATE > > -- > 2.7.4 >