Index: distdir.am =================================================================== RCS file: /cvs/automake/automake/distdir.am,v retrieving revision 1.12 diff -u -p -r1.12 distdir.am --- distdir.am 2001/03/23 17:54:05 1.12 +++ distdir.am 2001/04/05 22:21:13 @@ -43,6 +43,29 @@ distdir: $(DISTFILES) ?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. +## +?SUBDIRS? for subdir in $(%DIST_SUBDIR_NAME%); do \ +?SUBDIRS? if test "$$subdir" = .; then :; else \ +?SUBDIRS? test -d $(distdir)/$$subdir \ +?SUBDIRS? || mkdir $(distdir)/$$subdir \ +?SUBDIRS? || exit 1; \ +?SUBDIRS? (cd $$subdir && \ +?SUBDIRS? $(MAKE) $(AM_MAKEFLAGS) \ +?SUBDIRS? top_distdir="$(top_distdir)" \ +?SUBDIRS? distdir=../$(distdir)/$$subdir \ +?SUBDIRS? distdir) \ +?SUBDIRS? || exit 1; \ +?SUBDIRS? fi; \ +?SUBDIRS? done +## +## @for file in $(DISTFILES); do \ ## ## In loop, test for file existence because sometimes a file gets @@ -67,28 +90,6 @@ distdir: $(DISTFILES) || exit 1; \ 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. -## -?SUBDIRS? for subdir in $(%DIST_SUBDIR_NAME%); do \ -?SUBDIRS? if test "$$subdir" = .; then :; else \ -?SUBDIRS? test -d $(distdir)/$$subdir \ -?SUBDIRS? || mkdir $(distdir)/$$subdir \ -?SUBDIRS? || exit 1; \ -?SUBDIRS? (cd $$subdir && \ -?SUBDIRS? $(MAKE) $(AM_MAKEFLAGS) \ -?SUBDIRS? top_distdir="$(top_distdir)" \ -?SUBDIRS? distdir=../$(distdir)/$$subdir \ -?SUBDIRS? distdir) \ -?SUBDIRS? || exit 1; \ -?SUBDIRS? fi; \ -?SUBDIRS? done ## ## We might have to perform some last second updates, such as updating ## info files.