Subject: bug#20699: Acknowledgement (subdir-objects with source from sibling directory breaks distcheck)

From: Hans-Bernhard Bröker <[email-masked]>
Date: Sun, 21 Jun 2015 23:14:32 +0200

It's actually even a little worse:

Any dependency on sources in another directory causes a simple "make 
clean" in one directory to erase _all_ object files on that other one, 
i.e. if docs/Makefile.am has

noinst_PROGRAMS = a

a_SOURCES = sub/a.c ../src/main.c
a_CPPFLAGS = -DFOO=BAR $(AM_CPPFLAGS)

then "make -C docs clean" does the following:

make: Entering directory '/cygdrive/c/prg/gp/am_bug/amhello-1.0/docs'
test -z "a.exe" || rm -f a.exe
rm -f *.o
rm -f ../src/*.o
rm -f sub/*.o
make: Leaving directory '/cygdrive/c/prg/gp/am_bug/amhello-1.0/docs'

But what logic would a "clean" in one sub project erase all the work 
done in another?

With consequences like that, I think the (all but forced, now) option 
"subdir-objects" needs to be reconsidered.