https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62157
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- From: https://www.gnu.org/software/automake/manual/html_node/SUBDIRS-vs-DIST_005fSUBDIRS.html If SUBDIRS contains AC_SUBST variables, DIST_SUBDIRS will not be defined correctly because Automake does not know the possible values of these variables. In this case DIST_SUBDIRS needs to be defined manually. And from https://www.gnu.org/software/automake/manual/html_node/Unconfigured-Subdirectories.html For instance, if you define SUBDIRS conditionally using AC_SUBST and do not define DIST_SUBDIRS explicitly, it will be default to ‘$(SUBDIRS)’; another possibility is to force DIST_SUBDIRS = $(SUBDIRS).