unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57949: git head; unportable test(1) operator
@ 2022-09-20  7:08 Thomas Klausner
  2022-09-20  9:22 ` Gregory Heytings
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Klausner @ 2022-09-20  7:08 UTC (permalink / raw)
  To: 57949

Hi!

In
https://github.com/emacs-mirror/emacs/commit/7c8a131984ab47349381975dead1712ae25ae2c6
Makefile.in started using "==" as test(1) comparison operator.

This is not portable, only bash supports it. POSIX mandates "=".

Please apply the following patch:

--- Makefile.in.orig    2022-09-19 23:17:34.000000000 +0000
+++ Makefile.in
@@ -417,7 +417,7 @@ sanity-check:
        @v=$$(src/emacs${EXEEXT} --batch --eval \
          '(progn (defun f (n) (if (= 0 n) 1 (* n (f (- n 1))))) (princ (f 10)))' \
          2> /dev/null); \
-       [ "X$$v" == "X3628800" ] && exit 0; \
+       [ "X$$v" = "X3628800" ] && exit 0; \
        echo; \
        echo "  \"make ${make-target}\" succeeded, but Emacs is not functional."; \
        cat Makefile | \

Thanks,
 Thomas





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

* bug#57949: git head; unportable test(1) operator
  2022-09-20  7:08 bug#57949: git head; unportable test(1) operator Thomas Klausner
@ 2022-09-20  9:22 ` Gregory Heytings
  2022-09-20 11:51   ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Gregory Heytings @ 2022-09-20  9:22 UTC (permalink / raw)
  To: Thomas Klausner; +Cc: 57949-done


>
> Makefile.in started using "==" as test(1) comparison operator.
>
> This is not portable, only bash supports it. POSIX mandates "=".
>

Thanks, fixed!





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

* bug#57949: git head; unportable test(1) operator
  2022-09-20  9:22 ` Gregory Heytings
@ 2022-09-20 11:51   ` Eli Zaretskii
  2022-09-20 11:54     ` Gregory Heytings
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2022-09-20 11:51 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: 57949, wiz

> Resent-To: bug-gnu-emacs@gnu.org
> Cc: 57949-done@debbugs.gnu.org
> Date: Tue, 20 Sep 2022 09:22:16 +0000
> From: Gregory Heytings <gregory@heytings.org>
> 
> > Makefile.in started using "==" as test(1) comparison operator.
> >
> > This is not portable, only bash supports it. POSIX mandates "=".
> 
> Thanks, fixed!

Gregory, why are there ZERO-WIDTH SPACE characters in the top-level
Makefile.in?  What purpose do they server, and why cannot we do the
same with ASCII characters?





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

* bug#57949: git head; unportable test(1) operator
  2022-09-20 11:51   ` Eli Zaretskii
@ 2022-09-20 11:54     ` Gregory Heytings
  2022-09-20 12:00       ` Eli Zaretskii
  2022-09-20 15:24       ` Lars Ingebrigtsen
  0 siblings, 2 replies; 7+ messages in thread
From: Gregory Heytings @ 2022-09-20 11:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 57949


>>> Makefile.in started using "==" as test(1) comparison operator.
>>>
>>> This is not portable, only bash supports it. POSIX mandates "=".
>>
>> Thanks, fixed!
>
> Gregory, why are there ZERO-WIDTH SPACE characters in the top-level 
> Makefile.in?  What purpose do they server, and why cannot we do the same 
> with ASCII characters?
>

Their purpose is to make the text behave exactly like the "CC", "ELC", 
"GEN", "INFO", ... messages printed by make.  If it's problematic to have 
zero-width space characters there, they could be removed and/or replaced 
by something else.





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

* bug#57949: git head; unportable test(1) operator
  2022-09-20 11:54     ` Gregory Heytings
@ 2022-09-20 12:00       ` Eli Zaretskii
  2022-09-20 14:20         ` Gregory Heytings
  2022-09-20 15:24       ` Lars Ingebrigtsen
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2022-09-20 12:00 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: 57949

> Date: Tue, 20 Sep 2022 11:54:55 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: 57949@debbugs.gnu.org
> 
> 
> >>> Makefile.in started using "==" as test(1) comparison operator.
> >>>
> >>> This is not portable, only bash supports it. POSIX mandates "=".
> >>
> >> Thanks, fixed!
> >
> > Gregory, why are there ZERO-WIDTH SPACE characters in the top-level 
> > Makefile.in?  What purpose do they server, and why cannot we do the same 
> > with ASCII characters?
> >
> 
> Their purpose is to make the text behave exactly like the "CC", "ELC", 
> "GEN", "INFO", ... messages printed by make.

I don't think I understand -- what do you expect to happen, as
opposed to when these are removed?

> If it's problematic to have zero-width space characters there, they
> could be removed and/or replaced by something else.

Depending on how you view them, they could appear as "<U+200B>", in
inverse video, on a terminal's display.  Which stands out and gets in
the way of reading.





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

* bug#57949: git head; unportable test(1) operator
  2022-09-20 12:00       ` Eli Zaretskii
@ 2022-09-20 14:20         ` Gregory Heytings
  0 siblings, 0 replies; 7+ messages in thread
From: Gregory Heytings @ 2022-09-20 14:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 57949


>> If it's problematic to have zero-width space characters there, they 
>> could be removed and/or replaced by something else.
>
> Depending on how you view them, they could appear as "<U+200B>", in 
> inverse video, on a terminal's display.  Which stands out and gets in 
> the way of reading.
>

Indeed.  I've now changed the way the message is displayed, it now uses 
three leading stars and is redirected to stderr, which is e.g. what the 
Linux kernel uses.





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

* bug#57949: git head; unportable test(1) operator
  2022-09-20 11:54     ` Gregory Heytings
  2022-09-20 12:00       ` Eli Zaretskii
@ 2022-09-20 15:24       ` Lars Ingebrigtsen
  1 sibling, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-20 15:24 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: Eli Zaretskii, 57949

Gregory Heytings <gregory@heytings.org> writes:

> Their purpose is to make the text behave exactly like the "CC", "ELC",
> "GEN", "INFO", ... messages printed by make.  If it's problematic to
> have zero-width space characters there, they could be removed and/or
> replaced by something else.

I think saying WARNING: instead would probably be clearer.





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

end of thread, other threads:[~2022-09-20 15:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20  7:08 bug#57949: git head; unportable test(1) operator Thomas Klausner
2022-09-20  9:22 ` Gregory Heytings
2022-09-20 11:51   ` Eli Zaretskii
2022-09-20 11:54     ` Gregory Heytings
2022-09-20 12:00       ` Eli Zaretskii
2022-09-20 14:20         ` Gregory Heytings
2022-09-20 15:24       ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).