Skip to content

Commit

Permalink
Fix distclean (mono/mono#16667)
Browse files Browse the repository at this point in the history
* 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 mono/mono#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 mono/mono#16605


Commit migrated from mono/mono@a678395
  • Loading branch information
directhex authored Sep 5, 2019
1 parent ff2e4a8 commit 29ade66
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/mono/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ EXTRA_DIST= \
winconfig.h \
code_of_conduct.md \
external \
netcore/Makefile \
mcs/class/referencesource

DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_RUNTIME=false
Expand Down
2 changes: 1 addition & 1 deletion src/mono/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ AC_CANONICAL_HOST
# The extra brackets are to foil regex-based scans.
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])

AM_INIT_AUTOMAKE([1.9 dist-xz tar-ustar no-dist-gzip foreign subdir-objects]
AM_INIT_AUTOMAKE([1.9 dist-xz tar-ustar no-dist-gzip foreign]
m4_esyscmd([case `automake --version | head -n 1` in # parallel-tests is default in automake 1.13+, we need to explicitly enable it
*1.11*|*1.12*) echo parallel-tests;; # for 1.11 and 1.12 but not below as those versions don't recognize the flag
esac])) # TODO: remove this hack once we require automake 1.11+
Expand Down
1 change: 1 addition & 0 deletions src/mono/netcore/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,4 @@ xunit-summary:
endif

distdir:
distclean:

0 comments on commit 29ade66

Please sign in to comment.