DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Patrice Buriez <patrice.buriez@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] kni: fixed compilation error on Ubuntu 14.04 LTS (kernel 3.13.0-30.54)
Date: Thu, 24 Jul 2014 16:54:03 +0200	[thread overview]
Message-ID: <2585103.SGNXcBzLTL@xps13> (raw)
In-Reply-To: <1406212131-22314-1-git-send-email-pablo.de.lara.guarch@intel.com>

> Unlike RHEL_RELEASE_CODE, there is no such UBUNTU_RELEASE_CODE available out of
> the box, so it needs to be crafted from the Makefile
> Similarly, UBUNTU_KERNEL_CODE is generated with ABI and upload numbers.

It's quite amazing to see that Linux distributions do backports and do not
provide a way to check them.
Anyway, thanks for the fix.

> +ifeq ($(shell type lsb_release >/dev/null 2>&1 && lsb_release -si),Ubuntu)

Why not this simpler form?
$(shell lsb_release -si 2>/dev/null)

> +MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(subst .,,$(shell lsb_release -sr))

Or you can use | tr -d . instead of subst and keep the flow from left to right.

> +UBUNTU_KERNEL_CODE := $(shell cut -d' ' -f2 /proc/version_signature |cut -d- -f1,2)
                                                                        ^
                                                         space missing here

> +UBUNTU_KERNEL_CODE := $(subst -,$(comma),$(UBUNTU_KERNEL_CODE))
> +UBUNTU_KERNEL_CODE := $(subst .,$(comma),$(UBUNTU_KERNEL_CODE))

Would be simpler with | tr -d .-

-- 
Thomas

  reply	other threads:[~2014-07-24 14:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-24 14:28 Pablo de Lara
2014-07-24 14:54 ` Thomas Monjalon [this message]
2014-07-24 14:59   ` Thomas Monjalon
     [not found]   ` <8BBE948C60307D47AD16B5B5B92A387E32E1A2B4@IRSMSX106.ger.corp.intel.com>
2014-08-01 13:15     ` Thomas Monjalon
2014-07-24 15:20 ` Chris Wright
2014-07-24 15:25   ` Thomas Monjalon
2014-07-24 15:43     ` Chris Wright

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=2585103.SGNXcBzLTL@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=patrice.buriez@intel.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).