From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Robin Jarry <robin.jarry@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] kni: avoid using lsb_release script
Date: Fri, 25 Nov 2016 11:27:04 +0000 [thread overview]
Message-ID: <f88de78b-1963-cfb7-acdb-84bfb5fccac0@intel.com> (raw)
In-Reply-To: <1480067575-6543-1-git-send-email-robin.jarry@6wind.com>
On 11/25/2016 9:52 AM, Robin Jarry wrote:
> The lsb_release script is part of an optional package which is not
> always installed. On the other hand, /etc/lsb-release is always present
> even on minimal Ubuntu installations.
>
> root@ubuntu1604:~# dpkg -S /etc/lsb-release
> base-files: /etc/lsb-release
>
> Read the file if present and use the variables defined in it.
>
> Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
> ---
> lib/librte_eal/linuxapp/kni/Makefile | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/lib/librte_eal/linuxapp/kni/Makefile b/lib/librte_eal/linuxapp/kni/Makefile
> index 4e99e07e7aec..63b9ac8779f8 100644
> --- a/lib/librte_eal/linuxapp/kni/Makefile
> +++ b/lib/librte_eal/linuxapp/kni/Makefile
> @@ -44,8 +44,12 @@ MODULE_CFLAGS += -I$(RTE_OUTPUT)/include -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/e
> MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h
> MODULE_CFLAGS += -Wall -Werror
>
> -ifeq ($(shell lsb_release -si 2>/dev/null),Ubuntu)
> -MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(shell lsb_release -sr | tr -d .)
> +ifneq ($(wildcard /etc/lsb-release),)
> +include /etc/lsb-release
> +endif
What about:
+-include /etc/lsb-release
> +
> +ifeq ($(DISTRIB_ID),Ubuntu)
> +MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(subst .,,$(DISTRIB_ID))
s/DISTRIB_ID/DISTRIB_RELEASE
> UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE $(RTE_KERNELDIR)/include/generated/utsrelease.h \
> | cut -d '"' -f2 | cut -d- -f1,2 | tr .- ,`,1)
> MODULE_CFLAGS += -D"UBUNTU_KERNEL_CODE=UBUNTU_KERNEL_VERSION($(UBUNTU_KERNEL_CODE))"
>
next prev parent reply other threads:[~2016-11-25 11:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-25 9:52 Robin Jarry
2016-11-25 11:27 ` Ferruh Yigit [this message]
2016-11-25 11:28 ` Robin Jarry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f88de78b-1963-cfb7-acdb-84bfb5fccac0@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=robin.jarry@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).