Bug 411021

Summary: 'make clean' does not delete all files when using multiple subdirs and non-recursive make
Product: [Fedora] Fedora Reporter: Roland Dreier <rolandd>
Component: automakeAssignee: Karsten Hopp <karsten>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-12-05 10:57:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
example project that shows bug none

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.