Coccinelle Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: mcgrof@suse.com (Luis R. Rodriguez)
To: cocci@systeme.lip6.fr
Subject: [Cocci] [PATCH 1/2] autotools: unify the way to determine version information
Date: Fri, 24 Jul 2015 19:12:28 +0200	[thread overview]
Message-ID: <20150724171228.GM30479@wotan.suse.de> (raw)
In-Reply-To: <CAJLtBvOvZqYf0NP4R-Amu_sc6Cz8=J7_gFsCuKCtM1dQ4yk5tQ@mail.gmail.com>

On Thu, Jul 23, 2015 at 07:18:34AM +0300, Nikolay Orlyuk wrote: > Do we still need VERSION=$(shell ./version.sh | tr -d '\n') ? I'm pretty
> sure that VERSION=$(shell ./version.sh) will be enough. Same for
> configure.ac.
> Moreover why script version.sh can't be simply?
> 
> #!/bin/sh
> > tr -d '\n' < ./version
> >

These are identical:

VERSION=`cat ./version | tr -d '\n'`
VERSION=`tr -d '\n' < ./version`

I'll give you calling cat can be avoided so lets go with that.
Either way we want to stash it into a variable so we can later
expand on it with something not in the version file which is
instead taken from the script we are adding.

> Other option would be to introduce subst. variable in configure.ac and use
> it in configurable Makefile. This approach might be more widespread.

We don't use automake, I think its best to keep it that way. I'll
just remove the double tr -d calls on both configure.ac and the top
level Makefile.

  Luis

  parent reply	other threads:[~2015-07-24 17:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21 20:50 [Cocci] [PATCH 0/2] coccinelle: add localversion information Luis R. Rodriguez
2015-07-21 20:51 ` [Cocci] [PATCH 1/2] autotools: unify the way to determine version information Luis R. Rodriguez
2015-07-23  4:18   ` Nikolay Orlyuk
2015-07-23  7:12     ` Sébastien Hinderer
2015-07-24 18:53       ` Luis R. Rodriguez
2015-07-31 13:40         ` [Cocci] " SF Markus Elfring
2015-08-05 21:13           ` Luis R. Rodriguez
2015-07-24 17:12     ` Luis R. Rodriguez [this message]
2015-07-26  6:55       ` [Cocci] [PATCH 1/2] " Nikolay Orlyuk
2015-07-27 19:26         ` Luis R. Rodriguez
2015-07-21 20:51 ` [Cocci] [PATCH 2/2] autotools: add localversion information Luis R. Rodriguez

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=20150724171228.GM30479@wotan.suse.de \
    --to=mcgrof@suse.com \
    --cc=cocci@systeme.lip6.fr \
    /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