]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
minor object-creation patch
authorTom Tromey <tromey@redhat.com>
Mon, 23 Feb 1998 23:17:56 +0000 (23:17 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 23 Feb 1998 23:17:56 +0000 (23:17 +0000)
ChangeLog
automake.in

index d62bb4bb1905b29a121cf2dfae0c28ebe46f0c7a..4f64e74a2e11c7382e94f58aabd0dbfbb6e7d1e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 Mon Feb 23 13:38:56 1998  Tom Tromey  <tromey@cygnus.com>
 
+       * automake.in (handle_single_transform_list): $objpat now a
+       parameter.  Set $objpat when suffix rule found.
+
        * aclocal.in (parse_arguments): Only put current year in --version
        output.
        * automake.in (parse_arguments): Only put current year in
index baa606ee03edaee15a044d10247002b22c52dbf2..a29e8c4baaf5dff19b5449bc312bc6ece7356087 100755 (executable)
@@ -1126,13 +1126,14 @@ sub check_libobjs_sources
 
 # Does much of the actual work for handle_source_transform.
 # Arguments are:
+#   pattern matching object extension (e.g., .o)
 #   list of source files to transform
 # Result is a list
 #   first element is name of linker to use (empty string for default linker)
 #   remaining elements are names of `.o's
 sub handle_single_transform_list
 {
-    local (@files) = @_;
+    local ($objpat, @files) = @_;
     local ($linker) = '';
     local (@result) = ();
     local ($nonansi_obj) = $obj;
@@ -1225,6 +1226,7 @@ sub handle_single_transform_list
            {
                # We just rewrite it.  Maybe we should do more.
                s//.$suffix_rules{$1}/;
+               $objpat = "\\." . $suffix_rules{$1};
            }
            else
            {
@@ -1296,7 +1298,8 @@ sub handle_source_transform
                foreach $cond (@conds)
                {
                    @files = &variable_value_as_list ($var, $cond);
-                   ($temp, @result) = &handle_single_transform_list (@files);
+                   ($temp, @result) = &handle_single_transform_list ($objpat,
+                                                                     @files);
                    $linker = $temp if $linker eq '';
 
                    # We have to have a new name for each such
@@ -1324,7 +1327,7 @@ sub handle_source_transform
            push (@files, $unxformed . '.c');
        }
 
-       ($temp, @result) = &handle_single_transform_list (@files);
+       ($temp, @result) = &handle_single_transform_list ($objpat, @files);
        $linker = $temp if $linker eq '';
        &define_pretty_variable ($one_file . "_OBJECTS", '', @result)
            unless $prefix eq 'EXTRA_';
@@ -1354,7 +1357,7 @@ sub handle_built_sources
     # We don't care about the return value of this function.  We just
     # want to make sure to update %dep_files with the contents of
     # BUILT_SOURCES.
-    &handle_single_transform_list (@sources);
+    &handle_single_transform_list ("\\.o", @sources);
 }
 
 # Special-case @ALLOCA@ and @LIBOBJS@ in _LDADD or _LIBADD variables.