From ef516a640488ab2823972ca3cf5af6475d535c55 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sun, 22 Sep 2002 19:02:44 +0000 Subject: [PATCH] * automake.in (handle_ltlibraries): Fill $libtool_clean_directories here, with directories where .la files are built... (handle_single_transform_list): ... not here with directories where .lo files are built. * tests/libtool3.test: Build a library in a subdirectory to check for this. Reported by Peter Gavin. --- ChangeLog | 8 ++++++++ THANKS | 1 + automake.in | 6 ++++-- tests/libtool3.test | 17 ++++++++++++++--- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index faf83b0d..33723277 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2002-09-22 Alexandre Duret-Lutz + * automake.in (handle_ltlibraries): Fill $libtool_clean_directories + here, with directories where .la files are built... + (handle_single_transform_list): ... not here with directories + where .lo files are built. + * tests/libtool3.test: Build a library in a subdirectory to + check for this. + Reported by Peter Gavin. + * tests/cond5.test: Give more time to automake. Reported by Art Haas. diff --git a/THANKS b/THANKS index b80707cc..9be301a3 100644 --- a/THANKS +++ b/THANKS @@ -152,6 +152,7 @@ Per Bothner bothner@cygnus.com Per Cederqvist ceder@lysator.liu.se Per Oyvind Hvidsten poeh@enter.vg Peter Breitenlohner peb@mppmu.mpg.de +Peter Gavin pgavin@debaser.kicks-ass.org Peter Mattis petm@scam.XCF.Berkeley.EDU Peter Muir iyhi@yahoo.com Petter Reinholdtsen pere@hungry.com diff --git a/automake.in b/automake.in index ecad4ae3..2916cc6f 100755 --- a/automake.in +++ b/automake.in @@ -2542,8 +2542,6 @@ sub handle_single_transform_list ($$$$@) { (my $xobj = $object) =~ s,lo$,\$(OBJEXT),; $compile_clean_files{$xobj} = MOSTLY_CLEAN; - - $libtool_clean_directories{$directory} = 1; } push (@dep_list, require_build_directory ($directory)); @@ -3415,6 +3413,10 @@ sub handle_ltlibraries # make sure this directory will exist. my $dirstamp = require_build_directory_maybe ($onelib); + # Remember to cleanup .libs/ in this directory. + my $dirname = dirname $onelib; + $libtool_clean_directories{$dirname} = 1; + $output_rules .= &file_contents ('ltlibrary', ('LTLIBRARY' => $onelib, 'XLTLIBRARY' => $xlib, diff --git a/tests/libtool3.test b/tests/libtool3.test index 66f50e69..208558cb 100755 --- a/tests/libtool3.test +++ b/tests/libtool3.test @@ -23,6 +23,8 @@ required='libtoolize gcc' . ./defs || exit 1 +set -e + cat >> configure.in << 'END' AC_PROG_CC AM_PROG_LIBTOOL @@ -30,14 +32,17 @@ AC_OUTPUT END cat > Makefile.am << 'END' -lib_LTLIBRARIES = lib0.la +lib_LTLIBRARIES = lib0.la liba/liba.la lib0_la_SOURCES = 0.c +liba_liba_la_SOURCES = liba/a.c bin_PROGRAMS = 1 1_SOURCES = 1.c -1_LDADD = lib0.la +1_LDADD = lib0.la $(top_builddir)/liba/liba.la END +mkdir liba + cat > 0.c << 'END' int zero (void) @@ -56,7 +61,13 @@ main () } END -set -e +cat > liba/a.c << 'END' +int +a (void) +{ + return 'a'; +} +END # Use --copy to workaround a bug in Cygwin's `cp -p' during distcheck. # (This bug is already exhibited by subobj9.test.) In brief: Cygwin's -- 2.43.5