automake-patches
[Top][All Lists]
Advanced

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

Re: Automake 1.10 fails to cleanup .libs directory for a program in a su


From: Ralf Wildenhues
Subject: Re: Automake 1.10 fails to cleanup .libs directory for a program in a subdirectory
Date: Wed, 15 Aug 2007 07:26:59 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

> * Karsten Hopp wrote on Mon, Aug 13, 2007 at 02:43:58PM CEST:
[...]
> > http://lists.gnu.org/archive/html/bug-automake/2007-06/msg00000.html

Proposed patch below.  OK to install to HEAD and branch-1-10, and put
Guillermo in THANKS?  I assume it doesn't matter much that ChangeLog is
encoded in ISO-8859 and THANKS is UTF-8 at the moment?

Cheers,
Ralf

        * automake.in (handle_programs): Also clean .libs/_libs
        directory for _PROGRAMS.
        * tests/libtoo10.test: New test.
        * tests/Makefile.am: Update.
        * THANKS: Update.
        Report by Guillermo Ontañón.

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1647
diff -u -r1.1647 automake.in
--- automake.in 7 Jul 2007 12:16:27 -0000       1.1647
+++ automake.in 15 Aug 2007 05:26:32 -0000
@@ -2485,6 +2485,8 @@
       # make sure this directory will exist.
       my $dirstamp = require_build_directory_maybe ($one_file);
 
+      $libtool_clean_directories{dirname ($one_file)} = 1;
+
       $output_rules .= &file_contents ('program',
                                       $where,
                                       PROGRAM  => $one_file,
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.622
diff -u -r1.622 Makefile.am
--- tests/Makefile.am   22 Jul 2007 08:48:18 -0000      1.622
+++ tests/Makefile.am   15 Aug 2007 05:26:32 -0000
@@ -332,6 +332,7 @@
 libtool7.test \
 libtool8.test \
 libtool9.test \
+libtoo10.test \
 license.test \
 link_c_cxx.test        \
 link_dist.test \
--- /dev/null   2007-08-04 15:05:22.228065249 +0200
+++ tests/libtoo10.test 2007-08-15 07:26:01.000000000 +0200
@@ -0,0 +1,63 @@
+#! /bin/sh
+# Copyright (C) 2007  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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 3, or (at your option)
+# any later version.
+#
+# GNU Automake 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 Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Make sure .libs directories are removed for _PROGRAMS.
+# Report from Guillermo Ontañón.
+
+required=libtoolize
+. ./defs || exit 1
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+lib_LTLIBRARIES = lib/libfoo.la
+lib_libfoo_la_SOURCES = foo.c
+bin_PROGRAMS = src/main
+check_PROGRAMS = check/test
+src_main_SOURCES = main.c
+check_test_SOURCES = main.c
+LDADD = lib/libfoo.la
+END
+
+mkdir lib src check
+cat > foo.c << 'END'
+int foo () { return 0; }
+END
+
+cat > main.c << 'END'
+extern int foo ();
+int main () { return foo (); }
+END
+
+libtoolize
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+./configure
+$MAKE all check clean
+test ! -d src/.libs
+test ! -d src/_libs
+test ! -d check/.libs
+test ! -d check/_libs
+$MAKE distcheck




reply via email to

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