This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Subdirectory problem
- From: Alexandre Duret-Lutz <duret_g at lrde dot epita dot fr>
- To: Peter Gavin <pgavin at debaser dot kicks-ass dot org>
- Cc: automake at gnu dot org, automake-patches at gnu dot org
- Date: 22 Sep 2002 21:01:25 +0200
- Subject: Re: Subdirectory problem
- References: <20020921223610.GA3421@debaser> <20020922014227.GA29549@debaser>
>>> "Peter" == Peter Gavin <pgavin@debaser.kicks-ass.org> writes:
[...]
Peter> But, make distclean fails to remove liba/.libs or any of
Peter> the files within, apparently because make distclean does
Peter> rm -f liba/liba.la instead of using libtool to remove
Peter> it.
Thanks. I'm installing the following patch to fix this bug.
(This will go in Automake 1.7.) However you'll see that this
issue disappears if you use `AUTOMAKE_OPTIONS = subdir-objects',
so that shouldn't be a problem for you.
2002-09-22 Alexandre Duret-Lutz <duret_g@epita.fr>
* 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.
Index: THANKS
===================================================================
RCS file: /cvs/automake/automake/THANKS,v
retrieving revision 1.185
diff -u -r1.185 THANKS
--- THANKS 20 Sep 2002 10:10:20 -0000 1.185
+++ THANKS 22 Sep 2002 18:57:43 -0000
@@ -152,6 +152,7 @@
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
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1360
diff -u -r1.1360 automake.in
--- automake.in 22 Sep 2002 14:35:19 -0000 1.1360
+++ automake.in 22 Sep 2002 18:58:10 -0000
@@ -2542,8 +2542,6 @@
{
(my $xobj = $object) =~ s,lo$,\$(OBJEXT),;
$compile_clean_files{$xobj} = MOSTLY_CLEAN;
-
- $libtool_clean_directories{$directory} = 1;
}
push (@dep_list, require_build_directory ($directory));
@@ -3414,6 +3412,10 @@
# If the resulting library lies into a subdirectory,
# 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,
Index: tests/libtool3.test
===================================================================
RCS file: /cvs/automake/automake/tests/libtool3.test,v
retrieving revision 1.2
diff -u -r1.2 libtool3.test
--- tests/libtool3.test 8 Sep 2002 13:07:55 -0000 1.2
+++ tests/libtool3.test 22 Sep 2002 18:58:36 -0000
@@ -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 @@
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 @@
}
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
--
Alexandre Duret-Lutz