]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
2001-02-16 Alexandre Duret-Lutz <duret_g@epita.fr>
authorTom Tromey <tromey@redhat.com>
Sat, 17 Feb 2001 02:34:19 +0000 (02:34 +0000)
committerTom Tromey <tromey@redhat.com>
Sat, 17 Feb 2001 02:34:19 +0000 (02:34 +0000)
* 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.

ChangeLog
TODO
automake.in

index 2141da657aa1de1d8751f4de0ae9ac21096cf620..e27863c0fcae55cc2b1419ffe58bbbeba40befad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-02-16  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * 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.
+
 2001-02-15  Tom Tromey  <tromey@redhat.com>
 
        * config.guess, config.sub: New versions from FSF.
diff --git a/TODO b/TODO
index aaa4f5cd551d1ec5392355f2b89b1b3f44b1a80f..42d1eb49858ed33dcc7893a2d59b05d417fe9b1b 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,5 @@
+have 'make check' print tests which are skipped
+
 we need a document describing automake from the end user's point of view
 eg describe INSTALL_HEADER there, among other things
 
index ef8c2b6f22d508ac5e023cfa14c0ac445c2ec84e..b0848411e30cdeacf421a7c3c53626653e66cc8b 100755 (executable)
@@ -4445,7 +4445,7 @@ sub scan_one_autoconf_file
 
            $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 =~ /^([^:]+):(.+)$/)
@@ -7816,6 +7816,36 @@ sub my_glob
     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;
+}
+
 ################################################################
 
 # Print an error message and set exit status.