[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: configure scripts rely on "diff"; could use "cmp" instead if availab
From: |
Eric Blake |
Subject: |
Re: configure scripts rely on "diff"; could use "cmp" instead if available |
Date: |
Tue, 24 May 2011 12:43:58 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10 |
[adding bug-standards]
On 05/24/2011 11:41 AM, Josh Triplett wrote:
> In trying to bootstrap a minimal environment, I ended up trying to run a
> configure script using just busybox (specifically, Debian's
> busybox-static). This almost worked, except that the configure script
> used diff several times. configure just uses diff for its exit code, to
> check for identical files. The version of busybox-static in Debian
> doesn't provide diff, but does provide cmp.
That's in conflict with the current GNU Coding Standards, which states
that a program can blindly assume the existence of diff on $PATH.
Either we need to tighten GCS to forbid unqualified use of diff, or
improve the busybox setup to start providing diff as expected by GCS, or
both.
http://www.gnu.org/prep/standards/standards.html#Utilities-in-Makefiles
> Rather than unconditionally using diff, please consider detecting and
> using an appropriate $ac_files_identical program; either diff or cmp
> would work. For that matter, such detection would also provide a good
> opportunity to check for a working diff -q or cmp -s, which run faster
> since they can stop at the first difference and don't have to generate
> output.
>
> Does this seem like a reasonable addition to autoconf? (If it falls
> under "OK, if someone provides a patch", I can do so.)
Certainly okay if someone provides a patch. It's not my highest
priority, but I like the idea if it improves portability of a configure
script.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: configure scripts rely on "diff"; could use "cmp" instead if available,
Eric Blake <=