autoconf-patches
[Top][All Lists]
Advanced

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

Re: "configure --help=recursive" only works in top_srcdir


From: Stepan Kasal
Subject: Re: "configure --help=recursive" only works in top_srcdir
Date: Tue, 17 Jul 2007 14:45:46 +0200
User-agent: Mutt/1.4.2.3i

Hello,

On Sun, Jul 01, 2007 at 05:18:18PM +0200, Hans Ulrich Niedermann wrote:
> [...] The user expectation is that running a program with "--help" or
> "--version" just prints the help text or version and then exits without
> causing *any* side effects.

right.

If I remember correctly, configure --help and --version just prints a
fixed text, which is known at the time the script is built.

Consequently, the following code might be added near the top of the
script:
        case $1 in
        --help | --help=* )
                # Print the help.
                exit;;
        --version )
                # Print the info.
                exit;;
        esac

Of course, we need a hook to place this code before most of the m4sh
initialization, but that can be done without compromising the
backward compatibility.

> (6) Get rid of the write requirements. Does "--help=recursive" really
> require PATH_SEPARATOR and the other things determined via writing to disk?

This would be a variant of the above.  Near the top of m4sh
initialization, we'd do:
        case $1 in
        --help | --help=* | --version ) as_skip_wr_tests=yes ;;
        esac
And then put the test which write to cwd inside an
        if test -z "$as_skip_wr_tests"

Would it be too crazy to hardwire this into the AS_INIT code?
The --help and --version option are special: they are defined in the GCS.

Comments welcome.

(Consequently, until the above is proved to be too naive, I do not
support the fix proposed by Ralf.)

Stepan




reply via email to

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