automake-ng
[Top][All Lists]
Advanced

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

[Automake-NG] [PATCH 11/14] [ng] cleanup: merge '%compile_clean_files' i


From: Stefano Lattarini
Subject: [Automake-NG] [PATCH 11/14] [ng] cleanup: merge '%compile_clean_files' in '%clean_files'
Date: Thu, 21 Jun 2012 12:32:42 +0200

No need to keep them separated anymore.

* automake.in (%compile_clean_files): Delete.
(initialize_per_input): Don't reset it.
(handle_compile): Don't merge '%compile_clean_files'
contents into '%clean_files'.
(handle_single_transform): Update '%clean_files', not
'%compile_clean_files'.
(handle_LIBOBJS_or_ALLOCA): Likewise.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 automake.in |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/automake.in b/automake.in
index 62206b7..e12cd92 100644
--- a/automake.in
+++ b/automake.in
@@ -530,12 +530,6 @@ my @check_tests;
 # DIST_CLEAN, etc).
 my (%clean_files, %clean_dirs);
 
-# Keys in this hash table are object files or other files in
-# subdirectories which need to be removed.  This only holds files
-# which are created by compilations.  The value in the hash indicates
-# when the file should be removed.
-my %compile_clean_files;
-
 # Keys in this hash table are directories where we expect to build a
 # libtool object.  We use this information to decide what directories
 # to delete.
@@ -657,7 +651,6 @@ sub initialize_per_input ()
 
     %clean_files = ();
     %clean_dirs = ();
-    %compile_clean_files = ();
 
     # We always include '.'.  This isn't strictly correct.
     %libtool_clean_directories = ('.' => 1);
@@ -1856,12 +1849,12 @@ sub handle_single_transform ($$$$$%)
             # of them -- very inefficient, see bug#10697), it would also
             # leave stale object files in the subdirectory whenever a
             # source file there is removed or renamed.
-            $compile_clean_files{"$directory/*.\$(OBJEXT)"} = MOSTLY_CLEAN;
+            $clean_files{"$directory/*.\$(OBJEXT)"} = MOSTLY_CLEAN;
             if ($object =~ /\.lo$/)
               {
                 # If we have a libtool object, then we also must remove
                 # any '.lo' objects in its same subdirectory.
-                $compile_clean_files{"$directory/*.lo"} = MOSTLY_CLEAN;
+                $clean_files{"$directory/*.lo"} = MOSTLY_CLEAN;
                 # Remember to cleanup .libs/ in this directory.
                 $libtool_clean_directories{$directory} = 1;
               }
@@ -2127,8 +2120,8 @@ sub handle_LIBOBJS_or_ALLOCA ($)
       $dir = "$topsrcdir/$dir" if $relative_dir ne '.';
       define_variable ('LIBOBJDIR', INTERNAL, $dir);
     }
-  $compile_clean_files{'$(LIBOBJDIR)*.$(OBJEXT)'} = MOSTLY_CLEAN;
-  $compile_clean_files{'$(LIBOBJDIR)*.lo'} = MOSTLY_CLEAN
+  $clean_files{'$(LIBOBJDIR)*.$(OBJEXT)'} = MOSTLY_CLEAN;
+  $clean_files{'$(LIBOBJDIR)*.lo'} = MOSTLY_CLEAN
     if $var =~ /^LT/;
 
   return $dir;
@@ -2221,7 +2214,6 @@ sub handle_compile ()
 {
    return if ! $must_handle_compiled_objects;
 
-   %mostly_cleaned = (%compile_clean_files, %mostly_cleaned);
    my ($coms, $vars, $rules) =
       &file_contents_internal (1, "$libdir/am/compile.am",
                               new Automake::Location,
-- 
1.7.9.5




reply via email to

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