From 1f2a0986c1787568acefd00849ffb2d6d2f69c26 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 21 Jun 2012 10:38:01 +0200 Subject: [PATCH] [ng] cleanup: remove 'libtool.am' 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 --- 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 081e5f159..627a6fc4e 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 ca2035294..293471daa 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_files{"libtool"} = DIST_CLEAN; + $clean_files{"config.lt"} = DIST_CLEAN; + } } # handle_programs () diff --git a/lib/am/libtool.am b/lib/am/libtool.am deleted file mode 100644 index 516f677aa..000000000 --- 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 . - -am__clean_dirs += %LIBTOOL-CLEAN-DIRECTORIES% - -?TOPDIR_P?am__distclean_files += libtool config.lt -- 2.47.2