From patchwork Thu Nov 19 10:04:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 56978 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp3082303lbb; Thu, 19 Nov 2015 02:09:01 -0800 (PST) X-Received: by 10.140.226.198 with SMTP id w189mr5465785qhb.83.1447927741663; Thu, 19 Nov 2015 02:09:01 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n63si6121196qge.69.2015.11.19.02.09.01; Thu, 19 Nov 2015 02:09:01 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: by lists.linaro.org (Postfix, from userid 109) id D560161FAC; Thu, 19 Nov 2015 10:09:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id BCD8961D75; Thu, 19 Nov 2015 10:08:54 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 5291A61E13; Thu, 19 Nov 2015 10:08:52 +0000 (UTC) Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) by lists.linaro.org (Postfix) with ESMTPS id 438B161D03 for ; Thu, 19 Nov 2015 10:08:51 +0000 (UTC) Received: by lfdo63 with SMTP id o63so44599193lfd.2 for ; Thu, 19 Nov 2015 02:08:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Oh0aHYMEiCmHyIV0OliAzoDiPCafKkWJ/LuSmC18090=; b=sTQ9dJQfOjVoCriVzevWVgttkVlMapyg79jww3Ubz6+VtnxquLuh/rmkiSYKan3WHN iEjFar+4FahQNmNb0NN/ze+ZuvVFXRZYGysSnuFfhA++FufVHNf0M639HNFxuenTSMNL jrVCubOVJxClYFB0L4oaZngGUTdMaqyWrOV6LClTHcNdauQGP0tp2dspXtWiNPOsSMm3 N+8GZaEzaOvHFuiu9n1irDC72ycX68URnLch+Q/FEhqe+Ozu7RRNJGCjOBknEvo3R0FQ PgjUiewe0iRiFpXheTwRTDEzhZwELzUexAQKshb7+4iMXu8b5D7wuODMefqrhLL0HMa9 44cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=Oh0aHYMEiCmHyIV0OliAzoDiPCafKkWJ/LuSmC18090=; b=WER9Q7aHbA8xC36XnTqmdtntYm/mppKbRNebbssPAXtVbmUCjHpENqeaJTwAi5+xlE GbCfrRPBvleHRKi9yrfYrgkKI614DBpZvHH3piJlL+hOC8unVy5v1+aZj7Qt6IgSvtVZ RslpQJvk8/4ghPuRY9uQOGPQqbPi/SABVfXVHHVB75xCoRyjMhxJoLN+hfKvaUsMqBiz or0BoslyXfIoKi4CjqzkDLvu2J2gSfpb54PXcxEdN03oa5Q5aRhhUeb/9DymASuudo1a R1xSoQ4dAIIczqDHFn+qeaBeF/VcZbLUsHLSNDLmA0SXmTbxGDMWb/jGsNyT1y+HxXhR Gq5Q== X-Gm-Message-State: ALoCoQl3RG+tdi9a8PreRdn2odh4j/eJG/SipMKMb29riZwrYJcNIu5WDYrh3fXD4iF3VAcM3JsH X-Received: by 10.25.32.144 with SMTP id g138mr2566776lfg.26.1447927730107; Thu, 19 Nov 2015 02:08:50 -0800 (PST) Received: from localhost.localdomain (c-aa3470d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.52.170]) by smtp.gmail.com with ESMTPSA id k14sm1088192lfb.49.2015.11.19.02.08.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Nov 2015 02:08:49 -0800 (PST) Date: Thu, 19 Nov 2015 11:04:18 +0100 From: Anders Roxell To: Nicolas Morey-Chaisemartin Message-ID: <20151119100418.GI5478@localhost.localdomain> References: <564D7D76.3000308@kalray.eu> <564D7DAD.8040704@kalray.eu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <564D7DAD.8040704@kalray.eu> User-Agent: Mutt/1.5.23 (2014-03-12) X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: Re: [lng-odp] [PATCH 2/2] bootstrap: auto generate platform list X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" On 2015-11-19 08:43, Nicolas Morey-Chaisemartin wrote: > This list all the available platforms looking for > platform/*/m4/configure.m4 and generate the appropriate m4 > file for the configure.ac to include > > Signed-off-by: Nicolas Morey-Chaisemartin > --- > bootstrap | 23 +++++++++++++++++++++++ > configure.ac | 9 +-------- > 2 files changed, 24 insertions(+), 8 deletions(-) > > diff --git a/bootstrap b/bootstrap > index 7c3d220..daa8c58 100755 > --- a/bootstrap > +++ b/bootstrap > @@ -1,5 +1,28 @@ > #! /bin/sh > set -x > + > +# Auto generate the platform list > +PLATFORM_M4S=$(ls platform/*/m4/configure.m4) > +PLATFORMS=$(basename -a ${PLATFORM_M4S//\/m4\/configure\.m4/}) > +GEN_M4="m4/platforms.m4" > + > +prefix="" > +echo "# Auto-Generated platform list" > $GEN_M4 > +for platform in $PLATFORMS; do > + cat << EOF >> $GEN_M4 > +${prefix}if test "\${with_platform}" == "${platform}"; > +then > + m4_include([./platform/${platform}/m4/configure.m4]) > +EOF > + prefix="el" > +done > +cat << EOF >> $GEN_M4 > +else > + echo "UNSUPPORTED PLATFORM: \${with_platform}" > + exit 1 > +fi > +EOF > + > aclocal -I config -I m4 > libtoolize --copy > autoheader > diff --git a/configure.ac b/configure.ac > index 0d7860b..157e5f3 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -87,14 +87,7 @@ netmap_support=no > > ########################################################################## > # Run platform specific checks and settings > -########################################################################## > -if test "${with_platform}" == "linux-generic"; > -then > - m4_include([./platform/linux-generic/m4/configure.m4]) > -else > - echo "UNSUPPORTED PLATFORM: ${with_platform}" > - exit 1 > -fi > +m4_include([m4/platforms.m4]) > > ########################################################################## > # Set conditionals as computed within platform specific files > -- > 2.6.3.372.gcb93895 > + ls platform/linux-generic/m4/configure.m4 platform/linux-satan/m4/configure.m4 + PLATFORM_M4S=platform/linux-generic/m4/configure.m4 platform/linux-satan/m4/configure.m4 ./bootstrap: 6: ./bootstrap: Bad substitution + PLATFORMS= + GEN_M4=m4/platforms.m4 + prefix= + echo # Auto-Generated platform list + cat + aclocal -I config -I m4 what do you think about adding this, think it fixed it for me. Cheers, Anders diff --git a/bootstrap b/bootstrap index daa8c58..75523f0 100755 --- a/bootstrap +++ b/bootstrap @@ -3,16 +3,16 @@ set -x # Auto generate the platform list PLATFORM_M4S=$(ls platform/*/m4/configure.m4) -PLATFORMS=$(basename -a ${PLATFORM_M4S//\/m4\/configure\.m4/}) GEN_M4="m4/platforms.m4" prefix="" echo "# Auto-Generated platform list" > $GEN_M4 -for platform in $PLATFORMS; do +for platform_m4 in $PLATFORM_M4S; do + platform=$(echo ${platform_m4}|awk -F'/' '{print $2}') cat << EOF >> $GEN_M4 ${prefix}if test "\${with_platform}" == "${platform}"; then - m4_include([./platform/${platform}/m4/configure.m4]) + m4_include([./${platform_m4}]) EOF prefix="el" done