bug-libtool
[Top][All Lists]
Advanced

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

Re: libtool.m4 usage of diff when comparing files


From: Ralf Wildenhues
Subject: Re: libtool.m4 usage of diff when comparing files
Date: Sun, 25 Apr 2010 12:01:17 +0200
User-agent: Mutt/1.5.20 (2009-10-28)

Hello Alfred,

thanks for the report and patch.

* Alfred M. Szmidt wrote on Sat, Apr 24, 2010 at 07:27:57PM CEST:
> Instead of using diff, we can use cmp which more common than diff.
> Reason is that I encountered a (custom) system without diff installed,
> but with gcc, and had ./configure output that it could not run diff.

info standards 'Utilities in Makefiles' lists both cmp and diff as
allowed tools.  The cases where diff is used in libtool.m4 compare text
files, and as such diff is the right tool to use, not cmp, because one
side of the comparison may have been munged by sed or other tools to
have a different newline encoding.

Now, if GNU diffutils used libtool, we'd have a bootstrapping issue that
would be useful to resolve, but other than that, I don't see why we
should limit ourselves here.  Even Autoconf uses diff in its configure
scripts, e.g., for lazily updating config.cache and config.h files, or
for AC_PROG_SED (a macro that comes from Libtool, BTW).  So you should
go for standards.texi (with a good rationale why diff is to be avoided),
Autoconf, and then Libtool, in that order, if you wanted to pursue this.
Or, easier, just install GNU diffutils, or use a cross setup or similar.

Cheers,
Ralf




reply via email to

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