[Top][All Lists]

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

Re: How to enable to generate configure to must take argum

From: TJ Yang
Subject: Re: How to enable to generate configure to must take arguments ?
Date: Wed, 10 Mar 2010 15:39:27 -0600

Thanks for the helps.
Lesson learn: I didn't put the argument process block of code
underneath AC_INIT().

my test

AC_INIT([mytest], [1.0], address@hidden)

if test $# == $MYARGS; then
  AS_MSG_ERROR([Invalid options, use --help to see good help stuff])

address@hidden test]$ ./ ;./configure
Preparing the mytest build system...please wait

Found GNU Autoconf version 2.63
Found GNU Automake version 1.11.1
Found GNU Libtool version 2.2.6b

Automatically preparing build ... done

The mytest build system is now prepared.  To build here, run:
configure: error: Invalid options, use --help to see good help stuff
address@hidden test]$

On Wed, Mar 10, 2010 at 2:50 PM, Eric Blake <address@hidden> wrote:
> On 03/10/2010 01:35 PM, TJ Yang wrote:
>> By default "./configure " will proceed to run itself and collect all
>> the system information.
>> I am thinking  of writing my own to generate configure to split 
>> out
>> the content of "--help"  or shoowing a usage message when there is no
>> argument provided.
> Why?  That violates the GNU Coding Standards - many developers have come
> to expect configure to work without arguments, and your package would be
> broken in their eyes.
>> Following code in doesn't exit out right away when I type
>> in "./configure"
>> if test $#  ne $MYARGS
> If you _absolutely_ must access $@ (or $*, $#), then your code to do so
> must occur immediately after AC_INIT:
>> then
>>    echo "Need one argument at least.\n"
>>    exit 0
> Please don't.  If you are going to make configure exit without
> completing, then at least exit with a non-zero status.
> --
> Eric Blake   address@hidden    +1-801-349-2682
> Libvirt virtualization library

T.J. Yang

reply via email to

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