Bug 411021 - 'make clean' does not delete all files when using multiple subdirs and non-recursive make
Summary: 'make clean' does not delete all files when using multiple subdirs and non-re...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: automake
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-04 19:59 UTC by Roland Dreier
Modified: 2007-12-05 10:57 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-12-05 10:57:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
example project that shows bug (1.20 KB, application/x-gzip)
2007-12-04 19:59 UTC, Roland Dreier
no flags Details

Description Roland Dreier 2007-12-04 19:59:13 UTC
Description of problem:
When using automake to generate a non-recursive Makefile for a package that has
multiple subdirectories, 'make clean' does not delete all generate files.  This
causes 'make distcheck' to fail.  I am attaching a complete example package that
shows this failure; the simple Makefile.am in the top level is:


INCLUDES = -I$(srcdir)/include
AM_CFLAGS = -g -Wall -D_GNU_SOURCE

lib_LTLIBRARIES = src/libbug.la
src_libbug_la_SOURCES = src/bug.c
src_libbug_la_LDFLAGS = -version-info 1 -export-dynamic

bin_PROGRAMS = example/ex
example_ex_SOURCES = example/ex.c
example_ex_LDADD = $(top_builddir)/src/libbug.la

include_HEADERS = include/bug.h

EXTRA_DIST = include/bug.h

if I unpack this package and do

    ./autogen.sh && ./configure && make distcheck

then the build ends with:

 rm -f example/ex example/ex
test -z "src/libbug.la" || rm -f src/libbug.la
rm -f "src/so_locations"
rm -rf .libs _libs
rm -rf src/.libs src/_libs
rm -f *.o
rm -f *.lo
rm -f *.tab.c
test -z "" || rm -f 
rm -f example/.dirstamp
rm -f src/.dirstamp
rm -f config.h stamp-h1
rm -f libtool
rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
rm -f config.status config.cache config.log configure.lineno config.status.lineno
rm -rf ./.deps
rm -f Makefile
ERROR: files left in build directory after distclean:
./example/.libs/ex
make[1]: *** [distcleancheck] Error 1
make[1]: Leaving directory `/users/rdreier/automake-bug/automake-bug-1.0/_build'
make: *** [distcheck] Error 2

and indeed the same thing can be verified with 'make && make clean' -- the
example/.libs directory is not deleted.




Version-Release number of selected component (if applicable):
$ automake --version
automake (GNU automake) 1.10


How reproducible:
fails every time!

Comment 1 Roland Dreier 2007-12-04 19:59:13 UTC
Created attachment 277311 [details]
example project that shows bug

Comment 2 Karsten Hopp 2007-12-05 10:57:31 UTC
This is similar to bug #249839 which I've reported upstream. This is the answer
I got:

> It's an Automake bug.  For now
> it's easiest to work around it with adding something like
>   # Work around an Automake bug:
>   clean-local:
>         rm -rf bar/.libs bar/_libs
> 
> in Makefile.am.  Automake should be fixed though.
> 
> Hope that helps.
> 
> Cheers,
> Ralf

So upstream is aware of this and hopefully will fix this in the next version.


Note You need to log in before you can comment on or make changes to this bug.