Fix distclean (mono/mono#16667)
authorJo Shields <joshield@microsoft.com>
Thu, 5 Sep 2019 17:25:48 +0000 (13:25 -0400)
committerGitHub <noreply@github.com>
Thu, 5 Sep 2019 17:25:48 +0000 (13:25 -0400)
commit29ade669dc1e2b9476d90f8af43fccf70fc6d9e0
tree2b12c9952f0b67a289ad8e16f0bcf90a5183b679
parentff2e4a8df828184b508daf1b37410ae67851e6f7
Fix distclean (mono/mono#16667)

* Disable `subdir-objects` mode in Automake

This forces creation of subdirectories' files (e.g. .deps/*.Plo) in the
parent directory listing the source file. This works around a situation
where two different files specify files in a different parent directory
(i.e. ../../support/adler32.c in mono/metadata/ and adler32.c in
support/) both emit files into the same place (support/.deps), causing
`make distclean` to try and delete support/.deps from two different
places, breaking distclean.

This unfortunately adds a pile of Automake warnings, during autogen.

The "correct" fix is to stop specifying zlib as a pile of flat .c files,
and instead put it in its own subdirectory, conditionally including
its .la files as required.

Partially fixes https://github.com/mono/mono/issues/16605

* Ship netcore/Makefile with an empty distclean rule

We need a netcore/ directory because we write to it during configure,
and we need a netcore/Makefile with a distclean rule, so top-level
recursive distclean doesn't fail. So specify both here.

Partially fixes https://github.com/mono/mono/issues/16605

Commit migrated from https://github.com/mono/mono/commit/a67839540ef15948b4aebbdcee9ec44ee0f0e9a1
src/mono/Makefile.am
src/mono/configure.ac
src/mono/netcore/Makefile