-----Original Message----- > Date: Wed, 7 Jun 2017 15:37:56 +0100 > From: David Hunt <david.h...@intel.com> > To: dev@dpdk.org > CC: tho...@monjalon.net, shreyansh.j...@nxp.com, David Hunt > <david.h...@intel.com> > 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 <david.h...@intel.com> > Acked-by: Shreyansh Jain <shreyansh.j...@nxp.com>
Acked-by: Jerin Jacob <jerin.ja...@caviumnetworks.com> > --- > 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 >