Bug 411021 - 'make clean' does not delete all files when using multiple subdirs and non-recursive make
'make clean' does not delete all files when using multiple subdirs and non-re...
Product: Fedora
Classification: Fedora
Component: automake (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Karsten Hopp
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-12-04 14:59 EST by Roland Dreier
Modified: 2007-12-05 05:57 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-12-05 05:57:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Roland Dreier 2007-12-04 14:59:13 EST
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

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 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:
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 14:59:13 EST
Created attachment 277311 [details]
example project that shows bug
Comment 2 Karsten Hopp 2007-12-05 05:57:31 EST
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.