bug-automake
[Top][All Lists]
Advanced

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

Automake 1.9.6 fails to cleanup .libs directory for a program in a subdi


From: Guillermo Ontañón
Subject: Automake 1.9.6 fails to cleanup .libs directory for a program in a subdirectory
Date: Thu, 07 Jun 2007 12:30:24 +0200

Hi,

I have a project that looks like this:

topdir/
    libfoo/
        foo.c
    bar/
        bar.c
    configure.ac
    Makefile.am

Note that there's just one Makefile.am at the top level. libfoo is
compiled with libtool and bar is linked to libfoo/libfoo.la.

make clean removes the .libs directory inside libfoo/ but not the one
inside bar/:

$ make clean
test -z "libfoo/libfoo.la" || rm -f libfoo/libfoo.la
rm -f "libfoo/so_locations"
rm -rf .libs _libs
rm -rf libfoo/.libs libfoo/_libs
 rm -f bar/bar bar/bar
rm -f *.o
rm -f bar/bar.o
rm -f libfoo/foo.o
rm -f libfoo/foo.lo
rm -f *.lo

The problem goes away if you move bar.c to the top level of the tree.
Removing the subdir-objects option didn't help. I'm running automake
1.9.6, autoconf 2.61 and libtool 1.5.22 on debian etch.

The following script reproduces the problem:

#!/bin/sh

mkdir foo
cd foo
mkdir libfoo
mkdir bar

cat > configure.ac << EOF
AC_INIT([foo], [0.1])
AM_INIT_AUTOMAKE([foreign subdir-objects 1.9])

LIBTOOL_VERSION_FLAGS="-version-info 0:0:0"
AC_SUBST(LIBTOOL_VERSION_FLAGS)

AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_LIBTOOL

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF

cat > Makefile.am << EOF
lib_LTLIBRARIES =
sbin_PROGRAMS =

lib_LTLIBRARIES+=libfoo/libfoo.la
libfoo_libfoo_la_LDFLAGS=\$(LIBTOOL_VERSION_FLAGS)
libfoo_libfoo_la_SOURCES=libfoo/foo.c

sbin_PROGRAMS+=bar/bar
bar_bar_LDADD = libfoo/libfoo.la
EOF

cat > libfoo/foo.c << EOF
void foo(void) {return;}
EOF

cat > bar/bar.c << EOF
extern void foo(void);
int main(int argc, char **argv) { foo() ; return 0; }
EOF

autoreconf -i && ./configure && make distcheck


-- 
Guillermo Ontañón <address@hidden>





reply via email to

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