Hi Reuben,
> When I use relocatable-lib it adds a line like this to Makefile in src/:
>
> include ../lib/$(DEPDIR)/relocatable.Plo
>
> In my top-level Makefile.am, I have "lib" (containing gnulib) before "src",
> which is necessary, because the programs in src link against libgnu.la.
>
> When I run "make distcheck", "make distclean" is run first in lib/. Then
> when it is run in src/ I get an error because reloctable.Plo no longer
> exists.
1)
When I use GNU hello, I cannot reproduce it, because it has only 1 Makefile.am.
When I use GNU gettext, the gettext-tools/gnulib-tests/ directory also refers
to a .la file in a sibling directory (../gnulib-lib/libgettextlib.la), but
the generated Makefile contains 'include' statements only for directories in
the current directory.
So, I cannot reproduce. => Next time, please tell how to reproduce it.
2) When I look at the generated Makefile, I see this snippet:
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
Have you tried to define the DIST_SUBDIRS variable in Makefile.am [1], listing
the
subdirectories in reverse order?
Bruno
[1]
https://www.gnu.org/software/automake/manual/html_node/SUBDIRS-vs-DIST_005fSUBDIRS.html