bug#77897: "make clean" should do a "rm -rf .deps"

Peter Johansson <[email protected]> Sat, 19 Apr 2025 08:38:42 +1000
Newsgroups gmane.comp.sysutils.automake.bugs
Message-ID <[email protected]>
Hi Sam,

On 4/18/25 21:56, Sam Varshavchik wrote:
>
> Set up a minimal Makefile.am and configure.ac to build this. Building 
> this will create .deps/<filename> with a:
>
> main.o: main.h main.c
>
When I do this with GCC, the .deps/<filename> also contains a line

main.h:

and I have no problem removing main.h and the #include and just run 
'make'. If you don't have that line (main.h:), it's bug in your compiler 
and I suggest you report it.


> Now: 1) 'rm -f main.h"  2) Remove the #include
>
> Then try to build this:
>
> make clean
> make
>
> Will fail because that dependency exists and make does not know how to 
> build main.h. I have to rm -rf .deps myself.
>
As a rule of thumb 'make clean' does not remove things that were created 
during configure (or upstream), but obviously depends on how people 
write the Makefile.am.

Cheers,

Peter