bug-make
[Top][All Lists]
Advanced

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

Re: GNU make 4.3.92 on mingw


From: David Boyce
Subject: Re: GNU make 4.3.92 on mingw
Date: Tue, 25 Oct 2022 14:18:33 -0400

I'd think it would be easy to write a diff script in Perl to avoid platform dependencies. In fact the result would be simpler than Paul describes because instead of actually modifying logfiles the mods could be done in-memory by the script. Reading in two text files, strinpping off newlines, optionally changing \ to /, and comparing is pretty trivial.

On Tue, Oct 25, 2022 at 2:12 PM Paul Smith <psmith@gnu.org> wrote:
On Tue, 2022-10-25 at 19:37 +0300, Eli Zaretskii wrote:
> > A lot of these seem to be CRLF errors in the diff, where it would
> > otherwise match.  I know that the test framework does some
> > manipulation of CRLF.
>
> If the test suite runs Diff, it should invoke it with the
> "--strip-trailing-cr" switch, I think.  Because Cygwin's (and MSYS's)
> Diff doesn't use Windows text-mode I/O.

OK I looked into the test suite to remind myself what it does.

First it compares the base and the log file directly; if they are equal
we're done.  If they're not equal we manipulate them by (a) converting
backslash to slash and (b) converting CRLF to LF, then we compare them
again.  If they're now the same, declare victory.  If they're still
different, then we invoke diff on the original versions.

So if we see a difference it must be that there's some OTHER difference
not just CRLF.  Or, the test suite comparison has a bug.  I'll have to
look more closely at the output.

I don't want to just add that diff switch because it's a GNU diff
switch and won't work on systems without GNU diff (BSD, etc.)  If I
wanted to use it I'd need to first check that it was available.  Which
could be done of course.


reply via email to

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