Re: unquote-am_config_header.patch
"adl" == Alexandre Duret-Lutz [EMAIL PROTECTED] writes: adl 2001-01-17 Alexandre Duret-Lutz [EMAIL PROTECTED] adl* automake.in (unquote_m4_arg): New function. adl(scan_one_configure_file): Call unquote_m4_arg on adlAM_CONFIG_HEADER argument, so that AM_CONFIG_HEADER([foobar.h]) adlworks. I got email from the FSF today saying your paperwork has gone through. So I'm going to check this in. Tom
Re: unquote-am_config_header.patch
"adl" == Alexandre Duret-Lutz [EMAIL PROTECTED] writes: adl 2001-01-18 Alexandre Duret-Lutz [EMAIL PROTECTED] adl* automake.in (scan_one_configure_file): Unquote AC_CONFIG_AUX_DIR's adlargument. I checked this in. Tom
Re: unquote-am_config_header.patch
"Tom" == Tom Tromey [EMAIL PROTECTED] writes: "adl" == Alexandre Duret-Lutz [EMAIL PROTECTED] writes: [...] adl + # don't count orphan right brackets adl + $depth = 0 if $depth 0; Tom How important is this? Peanut. But since I was going to mimic m4, it doesn't hurt. Tom I'm considering rewriting the patch so that unquote_m4_arg Tom simply uses a regexp. Is it possible? I could not find a way. [...] -- Alexandre Duret-Lutz
Re: unquote-am_config_header.patch
"adl" == Alexandre Duret-Lutz [EMAIL PROTECTED] writes: adl AM_CONFIG_HEADER([config.h]) adl May I suggest the change below? (I browsed the source and didn't adl find something similar to unquote_m4_arg, that's quite adl surprising; did I missed something?) This looks good to me. Unfortunately it is long enough to require paperwork before I can check it in. adl + # don't count orphan right brackets adl + $depth = 0 if $depth 0; How important is this? I'm considering rewriting the patch so that unquote_m4_arg simply uses a regexp. Then I think I can check it in immediately. I agree a function like this would be very useful. Sometimes seemingly obvious helper functions go unimplemented for no good reason (historical usually). For instance Akim's recent addition of `transform' -- wish I'd had that a long time ago. Tom
Re: unquote-am_config_header.patch
"Lars" == Lars J Aas [EMAIL PROTECTED] writes: [...] Lars You will also find that Lars AC_CONFIG_AUX_DIR([cfg]) Lars won't fly according to automake... 2001-01-18 Alexandre Duret-Lutz [EMAIL PROTECTED] * automake.in (scan_one_configure_file): Unquote AC_CONFIG_AUX_DIR's argument. --- automake.in.old Thu Jan 18 19:53:32 2001 +++ automake.in Thu Jan 18 19:56:25 2001 @@ -4502,7 +4502,7 @@ if (/$AC_CONFIG_AUX_DIR_PATTERN/o) { - @config_aux_path = $1; + @config_aux_path = unquote_m4_arg ($1); } # Check for ansi2knr. -- Alexandre Duret-Lutz
unquote-am_config_header.patch
Hi, I'm afraid this AM_CONFIG_HEADER([config.h]) leads to configure.in: 3: required file `./[config.h].in' not found May I suggest the change below? (I browsed the source and didn't find something similar to unquote_m4_arg, that's quite surprising; did I missed something?) 2001-01-17 Alexandre Duret-Lutz [EMAIL PROTECTED] * automake.in (unquote_m4_arg): New function. (scan_one_configure_file): Call unquote_m4_arg on AM_CONFIG_HEADER argument, so that AM_CONFIG_HEADER([foobar.h]) works. --- automake.in.old Wed Jan 17 20:13:19 2001 +++ automake.in Wed Jan 17 22:31:03 2001 @@ -4558,7 +4558,7 @@ $config_header_line = $.; local ($one_hdr); - foreach $one_hdr (split (' ', $2)) + foreach $one_hdr (split (' ', unquote_m4_arg ($2))) { push (@config_fullnames, $one_hdr); if ($one_hdr =~ /^([^:]+):(.+)$/) @@ -7759,6 +7759,36 @@ { local ($pat) = @_; return ${pat}; +} + +# Remove one level of brackets and strip leading spaces, +# as does m4 to function arguments. +sub unquote_m4_arg +{ +$_ = shift; +s/^\s*//; + +my @letters = split //; +my @result = (); +my $depth = 0; + +foreach (@letters) +{ + if ($_ eq '[') + { + ++$depth; + next if $depth == 1; + } + elsif ($_ eq ']') + { + --$depth; + next if $depth == 0; + # don't count orphan right brackets + $depth = 0 if $depth 0; + } + push @result, $_; +} +return join '', @result; } -- Alexandre Duret-Lutz
Re: unquote-am_config_header.patch
On Thu, Jan 18, 2001 at 09:35:44AM +0100, Alexandre Duret-Lutz wrote: : Hi, : : I'm afraid this : : AM_CONFIG_HEADER([config.h]) : : leads to : : configure.in: 3: required file `./[config.h].in' not found You will also find that AC_CONFIG_AUX_DIR([cfg]) won't fly according to automake... Lars J -- Innovation is one percent inspiration and ninetynine percent perspiration, and in my case; twice that... -- Norville Barnes, `The Hudsucker Proxy'