]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* libtool.am: Do not emit .c.lo here...
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Sun, 25 Apr 1999 15:13:01 +0000 (15:13 +0000)
committerAlexandre Oliva <oliva@dcc.unicamp.br>
Sun, 25 Apr 1999 15:13:01 +0000 (15:13 +0000)
* depend2.am: ... emit .*.lo here, only when using libtool.
* automake.in (get_object_extension): No more @MINUSO@ here.
(handle_single_transform_list): Set $depfile from $object.
(handle_dependencies): Emit depend2.am for all used languages,
regardless of $use_dependencies; the setting of depcomp makes the
difference.
(lang_cxx_finish): Do not emit compilation rules.
(lang_objc_finish): Likewise.
(lang_java_finish): Likewise.

ChangeLog
automake.in
depend2.am
libtool.am

index 7bbbb89dd4175c0a5ac05996dcca9d4ee66f847c..9d41dbbddcee625a305e91186227c55faacd4383 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+1999-04-25  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * libtool.am: Do not emit .c.lo here...
+       * depend2.am: ... emit .*.lo here, only when using libtool.
+       * automake.in (get_object_extension): No more @MINUSO@ here.
+       (handle_single_transform_list): Set $depfile from $object.
+       (handle_dependencies): Emit depend2.am for all used languages,
+       regardless of $use_dependencies; the setting of depcomp makes the
+       difference.
+       (lang_cxx_finish): Do not emit compilation rules.
+       (lang_objc_finish): Likewise.
+       (lang_java_finish): Likewise.
+
 1999-04-21  Tom Tromey  <tromey@cygnus.com>
 
        * m4/depout.m4 (AM_OUTPUT_DEPENDENCY_COMMANDS): Correctly
index b2387c236e457541e509d4ea6dde47e5a2d17fef..8745b4952716452028ba91fb5e9b91c69d8c07a5 100755 (executable)
@@ -753,10 +753,7 @@ sub get_object_extension
 
        # Note that order of transforms is important here.  We collude
        # with compile.am to get the right result.
-       $xform = (($seen_objext ? 's/^OBJEXT//;' : 's/^OBJEXT.*$//;')
-                 . 's/\@MINUSO\@/'
-                 . (defined $options{'subdir-objects'} ? '-o \$\@' : '')
-                 . '/;');
+       $xform = ($seen_objext ? 's/^OBJEXT//;' : 's/^OBJEXT.*$//;');
        $output_rules .= &file_contents_with_transform ($xform, 'compile');
 
        &push_phony_cleaners ('compile');
@@ -1149,7 +1146,7 @@ sub handle_single_transform_list
 
            # Transform .o or $o file into .P file (for automatic
            # dependency code).
-           local ($depfile) = $xbase;
+           local ($depfile) = $object;
            $depfile =~ s/\.([^.]*)$/.P\1/;
            $dep_files{'$(DEPDIR)/' . $depfile} = 1;
        }
@@ -2653,34 +2650,40 @@ sub handle_dependencies
            $output_rules .= &file_contents ('depend');
            push (@clean, 'depend');
            &push_phony_cleaners ('depend');
-
-           local ($key, $lang, $ext, $xform);
-           foreach $key (sort keys %language_map)
-           {
-               next unless $key =~ /^(.*)-autodep$/;
-               next if $language_map{$key} eq 'no';
-               $lang = $1;
-
-               local ($pfx, $fpfx) = ($language_map{$key}, 'CC');
-               $fpfx = $pfx if ($pfx ne '');
-
-               $xform = ('s/\@PFX\@/' . $pfx . '/g;'
-                         . 's/\@FPFX\@/' . $fpfx . '/g;');
-               foreach $ext (&lang_extensions ($lang))
-               {
-                   $output_rules .=
-                       &file_contents_with_transform ('s/\@EXT\@/'
-                                                      . $ext . '/g;'
-                                                      . $xform,
-                                                      'depend2');
-               }
-           }
        }
     }
     else
     {
        &define_variable ('depcomp', '');
     }
+
+    local ($key, $lang, $ext, $xform);
+    foreach $key (sort keys %language_map)
+    {
+       next unless $key =~ /^(.*)-autodep$/;
+       next if $language_map{$key} eq 'no';
+       $lang = $1;
+
+       local ($pfx, $fpfx) = ($language_map{$key}, 'CC');
+       $fpfx = $pfx if ($pfx ne '');
+
+       $xform = ('s/\@PFX\@/' . $pfx . '/g;'
+                 . 's/\@FPFX\@/' . $fpfx . '/g;');
+       foreach $ext (&lang_extensions ($lang))
+       {
+           $output_rules .=
+               &file_contents_with_transform
+                 (($seen_objext ? 's/^OBJEXT//;' : 's/^OBJEXT.*$//;')
+                  . ($seen_libtool ? 's/^LIBTOOL//;' : 's/^LIBTOOL.*$//;')
+                  . 's/\@MINUSO\@/'
+                  . (defined $options{'subdir-objects'} ? ' -o \$\@' : '')
+                  . '/;'
+                  . 's/\@EXT\@/'
+                  . $ext . '/g;'
+                  . $xform,
+                  'depend2');
+       }
+    }
 }
 
 # Handle subdirectories.
@@ -4646,21 +4649,6 @@ sub lang_cxx_finish
        &define_variable ('CXXLD', '$(CXX)');
        &define_variable ('CXXLINK', $ltlink . '$(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@');
 
-       local ($ext);
-       foreach $ext (@cxx_list)
-       {
-           # Every known C++ compiler supports both -c and -o.
-           $output_rules .= ("$ext.o:\n"
-                             . "\t\$(CXXCOMPILE) -c -o \$\@ \$<\n");
-           # FIXME: Using cygpath should be somehow conditional.
-           $output_rules .= ("$ext.obj:\n"
-                             . "\t\$(CXXCOMPILE) -c -o \$\@ `cygpath -w \$<`\n")
-               if ($seen_objext);
-           $output_rules .= ("$ext.lo:\n"
-                             . "\t\$(LTCXXCOMPILE) -c -o \$\@ \$<\n")
-               if ($seen_libtool);
-       }
-
        if (! defined $configure_vars{'CXX'})
        {
            &am_error ("C++ source seen but \`CXX' not defined in \`configure.in'");
@@ -4975,17 +4963,6 @@ sub lang_objc_finish
     &define_variable ('OBJCLD', '$(OBJC)');
     &define_variable ('OBJCLINK', $ltlink . '$(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@');
 
-    # All known ObjC compilers support -c and -o together.
-    $output_rules .= (".m.o:\n"
-                      . "\t\$(OBJCCOMPILE) -c -o \$\@ \$<\n");
-    # FIXME: Using cygpath should be somehow conditional.
-    $output_rules .= (".m.obj:\n"
-                      . "\t\$(OBJCCOMPILE) -c -o \$\@ `cygpath -w \$<`\n")
-        if ($seen_objext);
-    $output_rules .= (".m.lo:\n"
-                      . "\t\$(LTOBJCCOMPILE) -c -o \$\@ \$<\n")
-        if ($seen_libtool);
-
     if (! defined $configure_vars{'OBJC'})
     {
        &am_error ("Objective C source seen but \`OBJC' not defined in \`configure.in'");
@@ -5005,17 +4982,6 @@ sub lang_java_finish
     &define_variable ('GCJLD', '$(GCJ)');
     &define_variable ('GCJLINK', $ltlink . '$(GCJLD) $(AM_GCJFLAGS) $(GCJFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@');
 
-    # All known Java compilers support -c and -o together.
-    $output_rules .= (".java.o:\n"
-                      . "\t\$(GCJCOMPILE) -c -o \$\@ \$<\n");
-    # FIXME: Using cygpath should be somehow conditional.
-    $output_rules .= (".java.obj:\n"
-                      . "\t\$(GCJCOMPILE) -c -o \$\@ `cygpath -w \$<`\n")
-        if ($seen_objext);
-    $output_rules .= (".java.lo:\n"
-                      . "\t\$(LTGCJCOMPILE) -c -o \$\@ \$<\n")
-        if ($seen_libtool);
-
     if (! defined $configure_vars{'GCJ'})
     {
        &am_error ("Java source seen but \`GCJ' not defined in \`configure.in'");
index 07fd5b49a30e5ff7cef18c0e7434a3f454494270..cb61894a3ddec4ea2cab4f0c265c020c75eb7e85 100644 (file)
        source='$<' object='$@' depfile='$(DEPDIR)/$*.Po' $(@FPFX@DEPMODE) \
        $(depcomp) $(@PFX@COMPILE) -c@MINUSO@ $<
 
-@EXT@.lo:
-       source='$<' object='$@' depfile='$(DEPDIR)/$*.Plo' $(@FPFX@DEPMODE) \
-       $(depcomp) $(LT@PFX@COMPILE) -c@MINUSO@ $<
+LIBTOOL@EXT@.lo:
+LIBTOOL        source='$<' object='$@' depfile='$(DEPDIR)/$*.Plo' $(@FPFX@DEPMODE) \
+LIBTOOL        $(depcomp) $(LT@PFX@COMPILE) -c@MINUSO@ $<
 
 OBJEXT@EXT@.obj:
 OBJEXT source='$<' object='$@' depfile='$(DEPDIR)/$*.Pobj' $(@FPFX@DEPMODE) \
 OBJEXT $(depcomp) $(@PFX@COMPILE) -c@MINUSO@ `cygpath -w $<`
+
index 299c1a954d7a6340dfd16db5ecebf5fae8285acc..505422509ee6b74c0204037af3317390d595f4c2 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-.c.lo:
-## Note that we explicitly set the libtool mode.  This avoids any lossage
-## if the program doesn't have a name that libtool expects.
-       source=$< object=$@ depfile=$(DEPDIR)/$*.Plo $(CCDEPMODE) \
-       $(depcomp) $(LIBTOOL) --mode=compile $(COMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
        -rm -f *.lo