automake-ng
[Top][All Lists]
Advanced

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

[Automake-NG] [PATCH 13/14] [ng] cleanup: remove 'libtool.am'


From: Stefano Lattarini
Subject: [Automake-NG] [PATCH 13/14] [ng] cleanup: remove 'libtool.am'
Date: Thu, 21 Jun 2012 12:32:44 +0200

It's so small and dumb that it's easier and cleaner to just inline
it in the automake script.

* lib/am/libtool.am: Delete.
* Makefile.am (dist_am_DATA): Remove it.
* automake.in (handle_libtool): Just add the list of all the '.libs'
directories to '%libtool_clean_directories', instead of processing the
now-removed 'libtool.am' to obtain the same effect.  Similarly, when
processing the Makefile in the top-level directory, add 'libtool' and
'config.lt' to '%clean_files'.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 Makefile.am       |    1 -
 automake.in       |   21 ++++++++++++---------
 lib/am/libtool.am |   19 -------------------
 3 files changed, 12 insertions(+), 29 deletions(-)
 delete mode 100644 lib/am/libtool.am

diff --git a/Makefile.am b/Makefile.am
index 081e5f1..627a6fc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -210,7 +210,6 @@ dist_am_DATA = \
   lib/am/lex.am \
   lib/am/library.am \
   lib/am/libs.am \
-  lib/am/libtool.am \
   lib/am/lisp.am \
   lib/am/ltlib.am \
   lib/am/ltlibrary.am \
diff --git a/automake.in b/automake.in
index 4354c25..a67a763 100644
--- a/automake.in
+++ b/automake.in
@@ -2231,17 +2231,20 @@ sub handle_libtool
   require_conf_file_with_macro (TRUE, 'LIBTOOL', FOREIGN, @libtool_files)
     if $relative_dir eq '.' && ! $libtool_new_api;
 
-  # .libs is for Unix, _libs for DOS.
-  my @libtool_clean_directories = map { ("$_/.libs", "$_/_libs") }
-                                  (sort keys %libtool_clean_directories);
   check_user_variables 'LIBTOOLFLAGS';
 
-  # Output the libtool compilation rules.
-  # FIXME: actually, this only output the libtool cleaning rules ...
-  # FIXME: some code reorganization/refactoring is probably in order.
-  $output_rules .= &file_contents (
-    'libtool', new Automake::Location,
-    'LIBTOOL-CLEAN-DIRECTORIES' => "@libtool_clean_directories");
+  foreach my $dir (%libtool_clean_directories)
+    {
+      # '.libs' is for Unix, '_libs' for DOS.
+      $clean_dirs{"$dir/.libs"} = CLEAN;
+      $clean_dirs{"$dir/_libs"} = CLEAN;
+    }
+
+  if ($relative_dir eq '.')
+    {
+      $clean_dirs{"libtool"} = DIST_CLEAN;
+      $clean_dirs{"config.lt"} = DIST_CLEAN;
+    }
 }
 
 # handle_programs ()
diff --git a/lib/am/libtool.am b/lib/am/libtool.am
deleted file mode 100644
index 516f677..0000000
--- a/lib/am/libtool.am
+++ /dev/null
@@ -1,19 +0,0 @@
-## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
-
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2, or (at your option)
-## any later version.
-
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-
-## You should have received a copy of the GNU General Public License
-## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-am__clean_dirs += %LIBTOOL-CLEAN-DIRECTORIES%
-
-?TOPDIR_P?am__distclean_files += libtool config.lt
-- 
1.7.9.5




reply via email to

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