]> sourceware.org Git - automake.git/commitdiff
back out mistaken commit
authorAlexandre Duret-Lutz <adl@gnu.org>
Fri, 18 Apr 2003 20:05:31 +0000 (20:05 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Fri, 18 Apr 2003 20:05:31 +0000 (20:05 +0000)
automake.in
tests/suffix7.test

index 81fde4f8655edc87424aa5c958e9b1d72c0bebc6..38e185579173f6e8fbf2e85a325aeea2a02b3149 100755 (executable)
@@ -2195,7 +2195,6 @@ 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 = $_;
@@ -2219,7 +2218,6 @@ 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}}))
@@ -5925,9 +5923,6 @@ 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}
@@ -7067,22 +7062,19 @@ sub register_suffix_rule ($$$)
       $suffix_rules->{$src} = { $dest => [ $dest, 1 ] };
     }
 
-  # 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)
+  # 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 ($dest =~ /\Q$suffix\E$/)
+      for my $dest2 (keys %{$suffix_rules->{$dest}})
        {
-         for my $dest2 (keys %{$suffix_rules->{$suffix}})
+         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)
            {
-             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 ];
-               }
+             $suffix_rules->{$src}{$dest2} = [ $dest, $dist ];
            }
        }
     }
@@ -7092,20 +7084,17 @@ sub register_suffix_rule ($$$)
   my @dest2 = keys %{$suffix_rules->{$src}};
   for my $src2 (keys %$suffix_rules)
     {
-      foreach my $suffix2 (keys %{$suffix_rules->{$src2}})
+      if (exists $suffix_rules->{$src2}{$src})
        {
-         if ($suffix2 =~ /\Q$src\E$/)
+         for my $dest2 (@dest2)
            {
-             for my $dest2 (@dest2)
+             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)
                {
-                 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 ];
-                   }
+                 $suffix_rules->{$src2}{$dest2} = [ $src, $dist ];
                }
            }
        }
index d28ceb2b4d1c9b8fbb1ed436c3d2e0afe2eb47fa..d5d82c82435384ebfdcf4d61ef7f6869071b9078 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002  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
-$AUTOCONF
-$AUTOMAKE
-./configure
-OBJEXT=bar $MAKE -e echo >stdout
-cat stdout
-grep 'BEG: foo.bar :END' stdout
+$ACLOCAL || exit 1
+$AUTOMAKE || exit 1
 
 # Make sure Automake has NOT recognized .cpp and .idlC as two new
 # extensions.
This page took 0.043229 seconds and 5 git commands to generate.