From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] kni: fixed compilation error on Ubuntu 14.04 LTS (kernel 3.13.0-30.54) Date: Thu, 24 Jul 2014 16:59:46 +0200 Message-ID: <1680012.MF3ndPgZrP@xps13> References: <1406212131-22314-1-git-send-email-pablo.de.lara.guarch@intel.com> <2585103.SGNXcBzLTL@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Patrice Buriez Return-path: In-Reply-To: <2585103.SGNXcBzLTL@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2014-07-24 16:54, Thomas Monjalon: > > 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 .- Sorry, I mean tr -d .- $(comma) -- Thomas