autoconf-patches
[Top][All Lists]
Advanced

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

RE: Patch for argument quoting when invoking sub-configures.


From: Tim Van Holder
Subject: RE: Patch for argument quoting when invoking sub-configures.
Date: Wed, 17 Jan 2001 19:13:38 +0100

> Tim> * acgeneral.m4 (_AC_OUTPUT_SUBDIRS): If necessary, quote the
> Tim> --srcdir and --cache-file options we add when running
> Tim> sub-configures.
> 
> I'm applying the first part of your patch, because the second is still
> not clear with regards to your comments.
OK.

> Tim> Note that the situation where cache-file or srcdir are quoted
> Tim> will currently result in them being passed _twice_ to the
> Tim> sub-configure, as the case structure at the start of
> Tim> _AC_OUTPUT_SUBDIRS won't match '--srcdir=* or '--cache-file=*'.
> 
> I'm sorry for being slow at understanding the full problem, but there
> is something unacceptable here.  We must not not know the state of
> these variables.  We can not keep `can' and must move to `are escaped'
> or `are not escaped'.
> 
> Can you show us two different runs with one showing them escaped, and
> not the other?
Sure: use this simple setup:

$ md foo
$ touch foo/bar.in

[configure.in]
AC_INIT(foo/bar.in)
AC_CONFIG_SUBDIRS(foo)
AC_OUTPUT

[foo/configure.in]
AC_INIT(bar.in)
AC_CONFIG_FILES(bar)
AC_OUTPUT

run autoconf on both configure.in's. No run configure, first without
options, then with --cache-file=hello\\world. In the second case, you'll
see both '--cache-file=hello\world' and --cache-file=../hello\world
being passed to the sub-configure.
This is not a big issue; the subconfigure still gets the right values (the
last option is used, and this is correct); it's just that the "old"
options aren't removed as they're supposed to be.
The only big issue is that the second option passed (the once created for
the benefit of the sub-configure) are NOT quoted, meaning that the
second run would use 2 separate cache files, or with srcdir, would not
find its sources. This was addressed by part 2 of the patch I sent in.
The first problem requires the use of "'--srcdir=*)" entries in the case
structure at the start of _AC_OUTPUT_SUBDIRS.

I hope this makes it clearer.

> Better yet (yet I know I'm very demanding here...)  could you submit a
> patch for the test suite to trigger your failure?  Look at torture.at,
> there is already code which exercises escaping of meta chars.
I'll look into this.




reply via email to

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