From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by dpdk.org (Postfix) with ESMTP id 76260B363 for ; Thu, 24 Jul 2014 16:58:29 +0200 (CEST) Received: by mail-we0-f176.google.com with SMTP id q58so2894506wes.21 for ; Thu, 24 Jul 2014 07:59:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=d9t/SlW29yO8+ai6kaS0LyaXueAo5afAH1R7zPpeenc=; b=fuMKUunCWCnb2rwVVb1L9dog7eN/R1s6Bwowkwiv+7t8XvVoAxoix+3NrOMm1CCGMo nPVN1Zg8TLQxG9GE/nIgpjYLF/I4JQWzb4CMFNaOrfsbCZxUJaVzqtdjhTiHGMO4pGFM hjxXnDy3pWD0BXMauJF8Qr2gxYLB9bNqN2bNchbWxop3kg0lisNM+ogQ0cWL/VWTGhFW dZLC7c+p9dEGPcGiQHE6WJHKY6+0e+/XlJ5LfvXb8abMy7BXSn1BzVwn7CjEr47rfNd4 2VdkiYqy/1Y0gUb/MhXd/oZOKXYsIy6lMozFyGkKY6SdpYGgdOg4Krw+EqhDNj5L17n+ f4aQ== X-Gm-Message-State: ALoCoQnL9+pZH5C71ReJCViK+UoARC89F7qnC6mkC4r4rmBe4QKU1dpvfW/dWfYOhUzmYsgZyrfY X-Received: by 10.180.78.100 with SMTP id a4mr35749679wix.36.1406213997875; Thu, 24 Jul 2014 07:59:57 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id ko8sm16563916wjc.11.2014.07.24.07.59.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jul 2014 07:59:57 -0700 (PDT) From: Thomas Monjalon To: Patrice Buriez Date: Thu, 24 Jul 2014 16:59:46 +0200 Message-ID: <1680012.MF3ndPgZrP@xps13> Organization: 6WIND User-Agent: KMail/4.13.2 (Linux/3.15.5-2-ARCH; KDE/4.13.2; x86_64; ; ) In-Reply-To: <2585103.SGNXcBzLTL@xps13> References: <1406212131-22314-1-git-send-email-pablo.de.lara.guarch@intel.com> <2585103.SGNXcBzLTL@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] kni: fixed compilation error on Ubuntu 14.04 LTS (kernel 3.13.0-30.54) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2014 14:58:29 -0000 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