Index: distdir.am =================================================================== RCS file: /cvs/automake/automake/distdir.am,v retrieving revision 1.15 diff -u -p -r1.15 distdir.am --- distdir.am 2001/04/10 12:41:04 1.15 +++ distdir.am 2001/04/20 00:41:33 @@ -49,6 +49,31 @@ endif %?TOPDIR_P% ## ?DISTDIRS? $(mkinstalldirs) %DISTDIRS% ## + +## Test for directory existence here because previous automake +## invocation might have created some directories. Note that we +## explicitly set distdir for the subdir make; that lets us mix-n-match +## many automake-using packages into one large package, and have "dist" +## at the top level do the right thing. If we're in the topmost +## directory, then we use `distdir' instead of `top_distdir'; this lets +## us work correctly with an enclosing package. +## +if %?SUBDIRS% + for subdir in $(%DIST_SUBDIR_NAME%); do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" \ + distdir=../$(distdir)/$$subdir \ + distdir) \ + || exit 1; \ + fi; \ + done +endif %?SUBDIRS% + ## @for file in $(DISTFILES); do \ ## @@ -75,29 +100,6 @@ endif %?TOPDIR_P% fi; \ done ## -## Test for directory existence here because previous automake -## invocation might have created some directories. Note that we -## explicitly set distdir for the subdir make; that lets us mix-n-match -## many automake-using packages into one large package, and have "dist" -## at the top level do the right thing. If we're in the topmost -## directory, then we use `distdir' instead of `top_distdir'; this lets -## us work correctly with an enclosing package. -## -if %?SUBDIRS% - for subdir in $(%DIST_SUBDIR_NAME%); do \ - if test "$$subdir" = .; then :; else \ - test -d $(distdir)/$$subdir \ - || mkdir $(distdir)/$$subdir \ - || exit 1; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" \ - distdir=../$(distdir)/$$subdir \ - distdir) \ - || exit 1; \ - fi; \ - done -endif %?SUBDIRS% ## ## We might have to perform some last second updates, such as updating ## info files.