Re: [RFC PATCH] m4sh: detect any shell that lacks ${a:-b} support

2010-08-25 Thread Eric Blake
On 08/24/2010 11:37 PM, Ralf Wildenhues wrote: The more aggressive approach is to assume that all shells that support shell functions also support : in variable substitutions; I can't really judge this one well. If Paul doesn't know, Sven Mascheck's pages are a good indicator. I think I'll

[PATCH 1/5] m4sh: fix some namespace safety issues

2010-08-25 Thread Eric Blake
* lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Avoid problems if as_myself is inherited from environment. (AS_TMPDIR): Be namespace clean. Signed-off-by: Eric Blake ebl...@redhat.com --- We shouldn't clobber $tmp without good reason. test -d '' reliably fails, so it makes test -n $as_tmp wasted

[PATCH 0/5] more aggressive on ${a:-b}

2010-08-25 Thread Eric Blake
I'm pushing the first four patches now. I will wait on the fifth one for a couple of days for any feedback. On cygwin, attempts to do a glob() with a filename that contains a backslash can issue a warning; but I have been unable to reliably reproduce that in my environment (otherwise, I would

[PATCH 2/5] docs: mention cost of globbing during variable expansion

2010-08-25 Thread Eric Blake
* doc/autoconf.texi (Shell Substitutions) ${var=literal}: Recommend quoting substitutions that might trigger globbing. (Limitations of Builtins) :: Likewise. * bin/autoconf.as: Follow our own advice. * lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES): Likewise. * lib/autoconf/general.m4

[PATCH 3/5] tests: improve some shell assumption testing

2010-08-25 Thread Eric Blake
* tests/m4sh.at (Functions Support, Functions and return Support) (Negated classes in globbing): Update comments. (AS@t...@_var basics): Test comparison to empty string. --- General cleanups, to ensure later patches don't break anything, and to add coverage for an otherwise untested code path in

[PATCH 5/5] m4sh: assume ${a:-b} support

2010-08-25 Thread Eric Blake
* tests/m4sh.at (Null variable substitution): New test. * doc/autoconf.texi (Shell Substitutions) ${var:-value}: Mention that m4sh guarantees support. (Limitations of Usual Tools) mktemp: Use it. * lib/m4sugar/m4sh.m4 (AS_LINENO_POP, AS_VAR_IF, AS_TMPDIR): Exploit use of colon for smaller files.

Re: [PATCH 2/5] docs: mention cost of globbing during variable expansion

2010-08-25 Thread Eric Blake
On 08/25/2010 05:18 PM, Eric Blake wrote: -Be sure to quote: +When using @sam...@{@var{va...@var{value}@}} to assign a default value +to @var{var}, remember that even though the assignment to @var{var} does +not undergo file name expansion, the result of the variable expansion +does. In

Re: [PATCH 1/5] m4sh: fix some namespace safety issues

2010-08-25 Thread Eric Blake
On 08/25/2010 05:18 PM, Eric Blake wrote: * lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Avoid problems if as_myself is inherited from environment. (AS_TMPDIR): Be namespace clean. Phooey. I didn't run the whole testsuite, but this patch breaks some of the tests, starting with 14: autoconf:

Re: [PATCH 1/5] m4sh: fix some namespace safety issues

2010-08-25 Thread Eric Blake
On 08/25/2010 08:56 PM, Eric Blake wrote: On 08/25/2010 05:18 PM, Eric Blake wrote: * lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Avoid problems if as_myself is inherited from environment. (AS_TMPDIR): Be namespace clean. Phooey. I didn't run the whole testsuite, but this patch breaks some of

Re: [PATCH 2/5] docs: mention cost of globbing during variable expansion

2010-08-25 Thread Eric Blake
On 08/25/2010 05:18 PM, Eric Blake wrote: * doc/autoconf.texi (Shell Substitutions)${var=literal}: Recommend quoting substitutions that might trigger globbing. Not quite right. :( AT_SETUP([autom4te preselections]) -: ${sleep='sleep 1'} # Command to force different time stamps. +:

[PATCH] docs: mention another issue with variable expansion

2010-08-25 Thread Eric Blake
In particular, see http://austingroupbugs.net/view.php?id=221 and http://austingroupbugs.net/view.php?id=255. * doc/autoconf.texi (Shell Substitutions) ${var-value}: New subsection. ${var=literal}: Tweak wording. Add mention of an ambiguity allowed by POSIX. * tests/torture.at (Substitute and

Re: VPATH test failure

2010-08-25 Thread Patrick Welche
On Tue, Aug 24, 2010 at 08:05:04PM +0200, Ralf Wildenhues wrote: I cannot reproduce this in NetBSD-current/i386 with git Autoconf, see a skip instead. And now neither can I! Story is: git pull setenv PATH /bin:/usr/bin:/usr/X11R7/bin:/usr/local/bin to avoid using anything in /usr/pkg/bin

porting with autotools

2010-08-25 Thread Reuben Hawkins
Hi All, I'm porting a large Windows toolkit to Linux, OSX, etc. Is there a tool which will walk my directory structure outputting Makefile.am in each directory where needed? If not, is there any reason to not write code to do just that? I was thinking output a Makefile.am in each dir which has

Re: porting with autotools

2010-08-25 Thread Gary V. Vaughan
On 26 Aug 2010, at 09:25, Reuben Hawkins wrote: I was thinking output a Makefile.am in each dir which has source in this format... noist_LTLIBRARIES = libdir_name.la libdir_name_la_SOURCES = source files in this directory func_output () { dirname=`echo $1 | sed 's,^.*/,,g'`