[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoconf test ': >emtpy' problem under Ultrix
From: |
Nicolas Joly |
Subject: |
Re: autoconf test ': >emtpy' problem under Ultrix |
Date: |
Mon, 19 Mar 2001 15:18:45 +0100 |
User-agent: |
Mutt/1.2.4i |
On Mon, Mar 19, 2001 at 11:23:10AM +0100, Akim Demaille wrote:
> >>>>> "Jim" == Jim Meyering <address@hidden> writes:
>
> Jim> I vaguely recall that we couldn't depend on touch. However, it
> Jim> *is* in the list of programs mentioned in standards.info's
> Jim> `Utilities in Makefiles' section.
>
> Anyway, we really need to know how to create portably empty files, we
> use it at other places IIRC.
>
> Jim> | or
> Jim> |
> Jim> | cp /dev/null empty
>
> Jim> Not everyone has a /dev/null.
>
> Huh??? What for instance?
>
> But anyway, /dev/null is *widespread* in Autoconf, so we shouldn't
> bother.
>
> Here is my proposal:
Ok, but the `diff -u' test is broken (see below).
> Index: tests/atgeneral.m4
> ===================================================================
> RCS file: /cvs/autoconf/tests/atgeneral.m4,v
> retrieving revision 1.61
> diff -u -u -r1.61 atgeneral.m4
> --- tests/atgeneral.m4 2001/03/13 12:43:15 1.61
> +++ tests/atgeneral.m4 2001/03/19 10:11:00
> @@ -187,9 +187,16 @@
> # Tests to run.
> test -z "$at_tests" && at_tests=$at_tests_all
>
> +# Can we diff with `/dev/null'? DU 5.0 refuses.
> +if diff /dev/null /dev/null >/dev/null 2>&1; then
> + at_devnull='/dev/null'
> +else
> + cp /dev/null at-devnull
> + at_devnull='at-devnull'
> +fi
> +
> # Use `diff -u' when possible.
> -: >empty
> -if diff -u empty empty >/dev/null 2>&1; then
> +if diff $at_devnull $at_devnull >/dev/null 2>&1; then
The `-u' flag is missing.
> at_diff='diff -u'
> else
> at_diff='diff'
> @@ -531,14 +538,14 @@
> stderr, [(echo stderr:; tee stderr <at-stderr) >&5],
> ignore, [(echo stderr:; cat at-stderr) >&5],
> experr, [$at_diff experr at-stderr >&5 || at_failed=:],
> - [], [$at_diff empty at-stderr >&5 || at_failed=:],
> + [], [$at_diff $at_devnull at-stderr >&5 || at_failed=:],
> [echo $at_n "AS_ESCAPE([$4])$at_c" | $at_diff - at-stderr >&5 ||
> at_failed=:])
> dnl Check stdout.
> m4_case([$3],
> stdout, [(echo stdout:; tee stdout <at-stdout) >&5],
> ignore, [(echo stdout:; cat at-stdout) >&5],
> expout, [$at_diff expout at-stdout >&5 || at_failed=:],
> - [], [$at_diff empty at-stdout >&5 || at_failed=:],
> + [], [$at_diff $at_devnull at-stdout >&5 || at_failed=:],
> [echo $at_n "AS_ESCAPE([$3])$at_c" | $at_diff - at-stdout >&5 ||
> at_failed=:])
> dnl Check exit val. Don't `skip' if we are precisely checking $? = 77.
> case $at_status in
>
--
Nicolas Joly
Informatique Scientifique
Institut Pasteur, Paris.
- autoconf test ': >emtpy' problem under Ultrix, Harlan Stenn, 2001/03/19
- Re: autoconf test ': >emtpy' problem under Ultrix, Alexandre Oliva, 2001/03/20
- Re: autoconf test ': >emtpy' problem under Ultrix, Akim Demaille, 2001/03/20
- Re: autoconf test ': >emtpy' problem under Ultrix, Alexandre Oliva, 2001/03/20
- Re: autoconf test ': >emtpy' problem under Ultrix, Akim Demaille, 2001/03/20
- Re: autoconf test ': >emtpy' problem under Ultrix, Peter Eisentraut, 2001/03/20
- Re: autoconf test ': >emtpy' problem under Ultrix, Akim Demaille, 2001/03/20
- Re: autoconf test ': >emtpy' problem under Ultrix, Peter Eisentraut, 2001/03/20