unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* TRANSFORM = s,x,x,
@ 2021-11-14  0:32 Hongyi Zhao
  2021-11-14  8:52 ` Kévin Le Gouguec
  2021-11-14 16:14 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 5+ messages in thread
From: Hongyi Zhao @ 2021-11-14  0:32 UTC (permalink / raw)
  To: help-gnu-emacs

In the Makefile of Emacs, there is the following code:

# Program name transformation.
TRANSFORM = s,x,x,

But I really can't figure out the effect of this transformation, as
shown in the following example:

$ echo emacs-29.0.50 | sed 's,x,x,'
emacs-29.0.50

As you can see, this transformation does nothing.

Any hints for this problem?

Regards,
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TRANSFORM = s,x,x,
  2021-11-14  0:32 TRANSFORM = s,x,x, Hongyi Zhao
@ 2021-11-14  8:52 ` Kévin Le Gouguec
  2021-11-14 10:34   ` Stephen Berman
  2021-11-15  5:13   ` Hongyi Zhao
  2021-11-14 16:14 ` Stefan Monnier via Users list for the GNU Emacs text editor
  1 sibling, 2 replies; 5+ messages in thread
From: Kévin Le Gouguec @ 2021-11-14  8:52 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

> Any hints for this problem?

Not sure about actual use-cases, but if you dig into Makefile.in, you'll
see that TRANSFORM is set from program_transform_name.  Jumping into the
configure script, this seems to be set only when --program-prefix or
--program-suffix are provided.

No idea if this is generic autotools stuff, and/or if this is relevant
to Emacs 🤷



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TRANSFORM = s,x,x,
  2021-11-14  8:52 ` Kévin Le Gouguec
@ 2021-11-14 10:34   ` Stephen Berman
  2021-11-15  5:13   ` Hongyi Zhao
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Berman @ 2021-11-14 10:34 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: help-gnu-emacs, Hongyi Zhao

On Sun, 14 Nov 2021 09:52:48 +0100 Kévin Le Gouguec <kevin.legouguec@gmail.com> wrote:

> Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>
>> Any hints for this problem?
>
> Not sure about actual use-cases, but if you dig into Makefile.in, you'll
> see that TRANSFORM is set from program_transform_name.  Jumping into the
> configure script, this seems to be set only when --program-prefix or
> --program-suffix are provided.
>
> No idea if this is generic autotools stuff, and/or if this is relevant
> to Emacs 🤷

It's from autoconf and seems to be intended for cross-compilation and
installing multiple versions, see e.g. https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.70/html_node/Transforming-Names.html#Transforming-Names

Steve Berman



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TRANSFORM = s,x,x,
  2021-11-14  0:32 TRANSFORM = s,x,x, Hongyi Zhao
  2021-11-14  8:52 ` Kévin Le Gouguec
@ 2021-11-14 16:14 ` Stefan Monnier via Users list for the GNU Emacs text editor
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2021-11-14 16:14 UTC (permalink / raw)
  To: help-gnu-emacs

Hongyi Zhao [2021-11-14 08:32:22] wrote:
> In the Makefile of Emacs, there is the following code:
> # Program name transformation.
> TRANSFORM = s,x,x,
>
> But I really can't figure out the effect of this transformation, as

It's intended to do nothing, but it allows to perform a rewriting by
overriding the value of TRANSFORM.


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TRANSFORM = s,x,x,
  2021-11-14  8:52 ` Kévin Le Gouguec
  2021-11-14 10:34   ` Stephen Berman
@ 2021-11-15  5:13   ` Hongyi Zhao
  1 sibling, 0 replies; 5+ messages in thread
From: Hongyi Zhao @ 2021-11-15  5:13 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: help-gnu-emacs

On Sun, Nov 14, 2021 at 4:52 PM Kévin Le Gouguec
<kevin.legouguec@gmail.com> wrote:
>
> Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>
> > Any hints for this problem?
>
> Not sure about actual use-cases, but if you dig into Makefile.in, you'll
> see that TRANSFORM is set from program_transform_name.  Jumping into the
> configure script, this seems to be set only when --program-prefix or
> --program-suffix are provided.

I confirmed your statement with the following supplementary information:

emacs.git$ rg -A1 -uu  'test.*program_(pre|suf)fix'  configure
4352:test "$program_prefix" != NONE &&
4353-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
--
4355:test "$program_suffix" != NONE &&
4356-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"


> No idea if this is generic autotools stuff, and/or if this is relevant
> to Emacs 🤷



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-15  5:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-14  0:32 TRANSFORM = s,x,x, Hongyi Zhao
2021-11-14  8:52 ` Kévin Le Gouguec
2021-11-14 10:34   ` Stephen Berman
2021-11-15  5:13   ` Hongyi Zhao
2021-11-14 16:14 ` Stefan Monnier via Users list for the GNU Emacs text editor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).