automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

109-handle-languages-morphing-9.patch


From: Akim Demaille
Subject: 109-handle-languages-morphing-9.patch
Date: Sun, 01 Apr 2001 21:57:20 +0200

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * automake.in (&handle_languages): `ext-compile.am' and
        `depend2.am' are now equivalent for generic rules: output only the
        latter.
        * ext-compile.am: Remove.

Index: automake.in
--- automake.in Sat, 31 Mar 2001 14:21:49 +0200 akim (am/f/39_automake.i 1.244 
755)
+++ automake.in Sat, 31 Mar 2001 14:28:47 +0200 akim (am/f/39_automake.i 1.244 
755)
@@ -1370,42 +1370,35 @@ sub handle_languages
          if (! $output_flag
              && $lang->flags eq 'CFLAGS'
              && defined $options{'subdir-objects'});
+       my $AMDEP = (($use_dependencies && $lang->autodep ne 'no')
+                    ? 'AMDEP' : 'FALSE');

        my %transform = ('EXT'     => $ext,
                         'PFX'     => $pfx,
                         'FPFX'    => $fpfx,
                         'LIBTOOL' => $seen_libtool,
-                        'AMDEP'   => $use_dependencies ? 'AMDEP' : 'FALSE',
+                        'AMDEP'   => $AMDEP,
                         '-c'      => $lang->compile_flag || '',
                         '-o'      => $output_flag);

-       # First include code for ordinary objects.
-       {
-         my %transform = (%transform,
-                          'GENERIC'   => 1,
-
-                          'BASE'      => '$*',
-                          'SOURCE'    => '$<',
-                          'OBJ'       => '$@',
-                          'OBJOBJ'    => '$@',
-                          'LTOBJ'     => '$@',
-
-                          'COMPILE'   => '$(' . $lang->compiler . ')',
-                          'LTCOMPILE' => '$(LT' . $lang->compiler . ')');
-
-
-         # Generate the appropriate rules for this extension.  If
-         # dependency tracking was requested, and this extension
-         # supports it, then we don't generate the rule here.
-         if ($use_dependencies && $lang->autodep ne 'no')
-           {
-             $output_rules .= file_contents ('depend2', %transform);
-           }
-         elsif (defined $lang->compile)
-           {
-             $output_rules .= file_contents ('ext-compile', %transform);
-           }
-       }
+       # Generate the appropriate rules for this extension.
+       if ($use_dependencies && $lang->autodep ne 'no'
+           || defined $lang->compile)
+         {
+           $output_rules .=
+             file_contents ('depend2',
+                            %transform,
+                            'GENERIC'   => 1,
+
+                            'BASE'      => '$*',
+                            'SOURCE'    => '$<',
+                            'OBJ'       => '$@',
+                            'OBJOBJ'    => '$@',
+                            'LTOBJ'     => '$@',
+
+                            'COMPILE'   => '$(' . $lang->compiler . ')',
+                            'LTCOMPILE' => '$(LT' . $lang->compiler . ')');
+         }

        # Then handle files with specific flags.
         if ($lang->autodep ne 'no')
@@ -1431,19 +1424,20 @@ sub handle_languages
                # Generate a transform which will turn suffix targets in
                # depend2.am into real targets for the particular objects we
                # are building.
-               $output_rules .= &file_contents ('depend2',
-                                                (%transform,
-                                                 'GENERIC'   => 0,
-
-                                                 'BASE'      => $obj,
-                                                 'SOURCE'    => $source,
-                                                 'OBJ'       => "$obj.o",
-                                                 'OBJOBJ'    => "$obj.obj",
-                                                 'LTOBJ'     => "$obj.lo",
-
-                                                 'COMPILE'   => $obj_compile,
-                                                 'LTCOMPILE' => 
$obj_ltcompile))
-             }
+               $output_rules .=
+                 file_contents ('depend2',
+                                (%transform,
+                                 'GENERIC'   => 0,
+
+                                 'BASE'      => $obj,
+                                 'SOURCE'    => $source,
+                                 'OBJ'       => "$obj.o",
+                                 'OBJOBJ'    => "$obj.obj",
+                                 'LTOBJ'     => "$obj.lo",
+
+                                 'COMPILE'   => $obj_compile,
+                                 'LTCOMPILE' => $obj_ltcompile))
+               }
          }

        # The rest of the loop is done once per language.
Index: Makefile.am
--- Makefile.am Thu, 15 Mar 2001 00:39:22 +0100 akim (am/f/46_Makefile.a 1.22 
644)
+++ Makefile.am Sat, 31 Mar 2001 14:25:19 +0200 akim (am/f/46_Makefile.a 1.22 
644)
@@ -12,8 +12,8 @@

 amfiles = ansi2knr.am check.am clean-hdr.am clean.am compile.am \
 configure.am data.am dejagnu.am depend.am depend2.am distdir.am \
-ext-compile.am footer.am header-vars.am header.am install.am java.am \
-lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
+footer.am header-vars.am header.am install.am java.am lex.am \
+library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
 mans-vars.am mans.am multilib.am program.am progs.am python.am \
 remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \
 texinfos.am yacc.am
Index: Makefile.in
--- Makefile.in Sun, 25 Mar 2001 16:15:19 +0200 akim (am/h/16_Makefile.i 1.63 
644)
+++ Makefile.in Sat, 31 Mar 2001 14:25:30 +0200 akim (am/h/16_Makefile.i 1.63 
644)
@@ -82,8 +82,8 @@

 amfiles = ansi2knr.am check.am clean-hdr.am clean.am compile.am \
 configure.am data.am dejagnu.am depend.am depend2.am distdir.am \
-ext-compile.am footer.am header-vars.am header.am install.am java.am \
-lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
+footer.am header-vars.am header.am install.am java.am lex.am \
+library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
 mans-vars.am mans.am multilib.am program.am progs.am python.am \
 remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \
 texinfos.am yacc.am



reply via email to

[Prev in Thread] Current Thread [Next in Thread]