public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Mahoney <jeffm@suse.com>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org, dsterba@suse.com
Subject: Re: [PATCH 3/3] btrfs-progs: build: use m4_flatten instead of m4_chomp
Date: Sun, 29 Apr 2018 09:19:24 -0400	[thread overview]
Message-ID: <e4ef1312-7622-bc71-c321-d4e627c2176b@suse.com> (raw)
In-Reply-To: <20180429101309.GN21272@twin.jikos.cz>


[-- Attachment #1.1: Type: text/plain, Size: 1432 bytes --]

On 4/29/18 6:13 AM, David Sterba wrote:
> On Fri, Apr 27, 2018 at 03:18:17PM -0400, Jeff Mahoney wrote:
>> On 4/27/18 2:56 PM, jeffm@suse.com wrote:
>>> From: Jeff Mahoney <jeffm@suse.com>
>>>
>>> Commit 2e1932e6a38 (btrfs-progs: build: simplify version tracking)
>>> started m4_chomp to strip the newlines from the version file.  m4_chomp
>>> was introduced in autoconf 2.64 but SLE11 ships with autoconf 2.63.
>>> For purposes of just stripping the newline, m4_flatten is sufficient.
>>
>> Scratch that.  The previous patch also requires autoconf 2.64.
> 
> I wanted to avoid shell tricks, but this should work everywhere:
> 
> m4_esyscmd([echo -n $(cat VERSION)])
> 

m4_flatten should work everywhere.  It's the AX_CHECK_COMPILE_FLAGS that
depends on autoconf 2.64.

I can fix the dependency, but it ends up looking like:

m4_version_prereq([2.64], [
    AX_CHECK_COMPILE_FLAG([-std=gnu90],[CSTD=-std=gnu90],[CSTD=-std=gnu89])
  ], [
    AX_GCC_VERSION([4], [5], [0], [CSTD=-std=gnu90],[CSTD=-std=gnu89])
  ])
AC_SUBST([CSTD])

AX_GCC_VERSION is deprecated, but works with earlier autoconf versions.
I'm not thrilled about it, but keying off the autoconf version and using
the newer way for newer versions means it'll be easier to drop it later
when we drop support for earlier autoconf.

Alternatively, I can just put this patch in the OBS project.

-Jeff

-- 
Jeff Mahoney
SUSE Labs


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2018-04-29 13:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27 18:56 [PATCH 0/3] btrfs-progs: build on SLE11 jeffm
2018-04-27 18:56 ` [PATCH 1/3] btrfs-progs: convert: fix support for e2fsprogs < 1.42 jeffm
2018-04-27 18:56 ` [PATCH 2/3] btrfs-progs: build: detect whether -std=gnu90 is supported jeffm
2018-04-27 18:56 ` [PATCH 3/3] btrfs-progs: build: use m4_flatten instead of m4_chomp jeffm
2018-04-27 19:18   ` Jeff Mahoney
2018-04-29 10:13     ` David Sterba
2018-04-29 13:19       ` Jeff Mahoney [this message]

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=e4ef1312-7622-bc71-c321-d4e627c2176b@suse.com \
    --to=jeffm@suse.com \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    /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