]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* tests/defs.in: Handle required=etags to work around Release-1-7-3b
authorAlexandre Duret-Lutz <adl@gnu.org>
Fri, 18 Apr 2003 19:59:31 +0000 (19:59 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Fri, 18 Apr 2003 19:59:31 +0000 (19:59 +0000)
Exuberant Ctags.

ChangeLog
automake.in
tests/defs.in
tests/suffix7.test

index 4c33f8595ca8aa83335cfbb376fe069d8504ca2c..84638369b3f0243d86671b4cfce5056f0e409c72 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2003-04-18  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       * tests/defs.in: Handle required=etags to work around
+       Exuberant Ctags.
+
        * lib/config.guess, lib/config.sub, lib/texinfo.tex: New upstream
        versions.
 
index 38e185579173f6e8fbf2e85a325aeea2a02b3149..81fde4f8655edc87424aa5c958e9b1d72c0bebc6 100755 (executable)
@@ -2195,6 +2195,7 @@ sub handle_single_transform_list ($$$$@)
         # into the current directory, unless the subdir-objects option
         # is in effect.
 
+       print "1. $_\n";
         # Split file name into base and extension.
         next if ! /^(?:(.*)\/)?([^\/]*)($KNOWN_EXTENSIONS_PATTERN)$/;
         my $full = $_;
@@ -2218,6 +2219,7 @@ sub handle_single_transform_list ($$$$@)
        my $aggregate = 'AM';
 
         $extension = &derive_suffix ($extension, $nonansi_obj);
+       print "2. $extension\n";
         my $lang;
         if ($extension_map{$extension} &&
             ($lang = $languages{$extension_map{$extension}}))
@@ -5923,6 +5925,9 @@ sub derive_suffix ($$)
 {
   my ($source_ext, $obj) = @_;
 
+  print "3. @{[keys %{$suffix_rules->{$source_ext}}]}\n";
+  print "3. @{[$suffix_rules->{$source_ext}{$obj}]}\n";
+
   while (! $extension_map{$source_ext}
         && $source_ext ne $obj
         && exists $suffix_rules->{$source_ext}
@@ -7062,19 +7067,22 @@ sub register_suffix_rule ($$$)
       $suffix_rules->{$src} = { $dest => [ $dest, 1 ] };
     }
 
-  # If we know how to transform $dest in something else, then
-  # we know how to transform $src in that "something else".
-  if (exists $suffix_rules->{$dest})
+  # If we know how to transform any suffix of $dest into something else,
+  # then we know how to transform $src in that "something else".
+  foreach my $suffix (keys %$suffix_rules)
     {
-      for my $dest2 (keys %{$suffix_rules->{$dest}})
+      if ($dest =~ /\Q$suffix\E$/)
        {
-         my $dist = $suffix_rules->{$dest}{$dest2}[1] + 1;
-         # Overwrite an existing $src->$dest2 path only if
-         # the path via $dest which is shorter.
-         if (! exists $suffix_rules->{$src}{$dest2}
-             || $suffix_rules->{$src}{$dest2}[1] > $dist)
+         for my $dest2 (keys %{$suffix_rules->{$suffix}})
            {
-             $suffix_rules->{$src}{$dest2} = [ $dest, $dist ];
+             my $dist = $suffix_rules->{$suffix}{$dest2}[1] + 1;
+             # Overwrite an existing $src->$dest2 path only if
+             # the path via $suffix which is shorter.
+             if (! exists $suffix_rules->{$src}{$dest2}
+                 || $suffix_rules->{$src}{$dest2}[1] > $dist)
+               {
+                 $suffix_rules->{$src}{$dest2} = [ $suffix, $dist ];
+               }
            }
        }
     }
@@ -7084,17 +7092,20 @@ sub register_suffix_rule ($$$)
   my @dest2 = keys %{$suffix_rules->{$src}};
   for my $src2 (keys %$suffix_rules)
     {
-      if (exists $suffix_rules->{$src2}{$src})
+      foreach my $suffix2 (keys %{$suffix_rules->{$src2}})
        {
-         for my $dest2 (@dest2)
+         if ($suffix2 =~ /\Q$src\E$/)
            {
-             my $dist = $suffix_rules->{$src}{$dest2} + 1;
-             # Overwrite an existing $src2->$dest2 path only if
-             # the path via $src is shorter.
-             if (! exists $suffix_rules->{$src2}{$dest2}
-                 || $suffix_rules->{$src2}{$dest2}[1] > $dist)
+             for my $dest2 (@dest2)
                {
-                 $suffix_rules->{$src2}{$dest2} = [ $src, $dist ];
+                 my $dist = $suffix_rules->{$src}{$dest2} + 1;
+                 # Overwrite an existing $src2->$dest2 path only if
+                 # the path via $src is shorter.
+                 if (! exists $suffix_rules->{$src2}{$dest2}
+                     || $suffix_rules->{$src2}{$dest2}[1] > $dist)
+                   {
+                     $suffix_rules->{$src2}{$dest2} = [ $src, $dist ];
+                   }
                }
            }
        }
index c056aad5e2435bb157ad8bbc398f2e83f62c1ac9..1d0735a1042fdc8f2d64d56db39b467a9dc0cc6e 100644 (file)
@@ -71,6 +71,14 @@ then
        echo "$me: running bison --version"
        ( bison --version ) || exit 77
        ;;
+      etags)
+       # Exuberant Ctags will create a TAGS file even
+       # when asked for --help or --version.  (Emacs's etags
+       # does not have such problem.)  Use -o /dev/null
+       # to make sure we do not pollute the tests/ directory.
+       echo "$me: running etags --version -o /dev/null"
+       ( etags --version -o /dev/null ) || exit 77
+       ;;
       GNUmake)
        # Use --version and -v, because SGI Make doesn't fail on --version.
        echo "$me: running $MAKE --version -v"
index d5d82c82435384ebfdcf4d61ef7f6869071b9078..d28ceb2b4d1c9b8fbb1ed436c3d2e0afe2eb47fa 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
 # Boston, MA 02111-1307, USA.
 
 # Test to make sure Automake supports implicit rules "confusing"
-# extensions.  Inspired by a mail from Alex Hornby. 
+# extensions.  Inspired by a mail from Alex Hornby.
 
+required=gcc
 . ./defs || exit 1
 
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CXX
+AC_OUTPUT
+END
+
 cat > Makefile.am << 'END'
 SUFFIXES = .idl S.cpp C.h
 SUFFIXES += C.cpp S.h
 .idlC.cpp:
        cp $< $@
+
+bin_PROGRAMS = foo
+foo_SOURCES = foo.idl
+
+echo:
+       @echo 'BEG: $(foo_OBJECTS) :END'
 END
 
 : > fooa
 
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+OBJEXT=bar $MAKE -e echo >stdout
+cat stdout
+grep 'BEG: foo.bar :END' stdout
 
 # Make sure Automake has NOT recognized .cpp and .idlC as two new
 # extensions.