config-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PATCH: eliminate backtick substitution


From: Zack Weinberg
Subject: Re: PATCH: eliminate backtick substitution
Date: Tue, 29 Dec 2020 20:55:41 -0500

Dmitry V. Levin wrote:
>On Tue, Dec 01, 2020 at 04:40:07PM -0700, Karl Berry wrote:
>>
>>     It's time to join the 1990s and replace the backtick substitutions in
>>     config.guess and config.sub with the $(..) command substitution
>>
>> I admit I don't understand the reason behind this last change that
>> Ben did.  What's wrong with `...`?
>>
>> No question $(...) is nicer in principle, but the $(...) requirement
>> breaks Solaris 10
>
> Does it really break Solaris 10?  The announcement says that
> "Configure scripts will automatically locate a shell that supports
> this feature and re-execute themselves with it, if necessary,
> so the new requirement should be transparent to most users."
>
> I suppose the change is not expected to cause any problems for users
> because they are highly likely to have some POSIX shell installed.

I just want to clarify that I made autoconf-generated configure
scripts “automatically locate a shell that supports $(...)” *because*
Ben changed config.guess and config.sub to use $(...).  Also because
third-party M4 macros and code written directly in configure.ac files
have a tendency to use $(...) nowadays, but the precipitating cause
was Ben’s change.  All of Autoconf’s own code still uses `...` as of
today.  I don’t plan on changing that myself, but I don’t think I
would stand in any other contributor’s way if they decided to change
it, either.

It seems to me it’s *safer* to use $(...) directly in a configure
script than it is to use it in config.{sub,guess}.  Code in a
configure script will *always* be protected by the M4sh machinery that
“automatically locate[s] a shell” (_AS_DETECT_BETTER_SHELL), but
config.{sub,guess} only get the benefit of that machinery if they’re
run *by* a configure script, not if they’re run by some other program
that doesn’t know it needs to do this.

zw



reply via email to

[Prev in Thread] Current Thread [Next in Thread]