]> sourceware.org Git - automake.git/commitdiff
* lib/am/distdir.am: Do not call $(mkdir_p) for each
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 6 Jun 2006 21:10:24 +0000 (21:10 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 6 Jun 2006 21:10:24 +0000 (21:10 +0000)
distributed file, collect them and create them in one run,
and strip $(srcdir) and $(top_srcdir) all at once.
Fix some comment typos.

ChangeLog
Makefile.in
doc/Makefile.in
lib/Automake/Makefile.in
lib/Automake/tests/Makefile.in
lib/Makefile.in
lib/am/Makefile.in
lib/am/distdir.am
m4/Makefile.in
tests/Makefile.in

index 8b49a147bd62bc97e1246d379182a989d804fa00..4d000b83f0a92d4ac9634b41abbd27af7c099fce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-06-06  Stepan Kasal  <kasal@ucw.cz>
+           Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+       * lib/am/distdir.am: Do not call $(mkdir_p) for each
+       distributed file, collect them and create them in one run,
+       and strip $(srcdir) and $(top_srcdir) all at once.
+       Fix some comment typos.
+
 2006-06-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * m4/depend.m4 (_AM_DEPENDENCIES): The IRIX MIPSpro compiler
index 27836e1aedee835e9fff78898754d98d3fb0143c..10daac2afe4b520fc35de83b33d5b59cbad21df2 100644 (file)
@@ -386,22 +386,21 @@ distdir: $(DISTFILES)
        $(am__remove_distdir)
        test -d $(distdir) || mkdir $(distdir)
        $(mkdir_p) $(distdir)/m4 $(distdir)/tests
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) ( cd "$(distdir)" && \
+               $(mkdir_p) `echo "$$dist_files" | \
+                           sed -n 's,/[^/]*$$,,p' | sort -u`) ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
index c931908838971b27eed40c0aef37d3c68eeb5eca..710162d6a7ead5f452c3b7c22ae0200fa0d672f5 100644 (file)
@@ -405,22 +405,21 @@ distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) ( cd "$(distdir)" && \
+               $(mkdir_p) `echo "$$dist_files" | \
+                           sed -n 's,/[^/]*$$,,p' | sort -u`) ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
index 0d06b7784ee6a4d223ea41735328d1936afcfd5e..987e9d0cbf17b0fa4f485403d7f9f3c47efd1c40 100644 (file)
@@ -390,22 +390,21 @@ distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) ( cd "$(distdir)" && \
+               $(mkdir_p) `echo "$$dist_files" | \
+                           sed -n 's,/[^/]*$$,,p' | sort -u`) ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
index d3aeaec1e37f4e10f1a15f6e5cde913f238fa371..c2055685994249976a4878c76912cedb14c5648a 100644 (file)
@@ -251,22 +251,21 @@ check-TESTS: $(TESTS)
        else :; fi
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) ( cd "$(distdir)" && \
+               $(mkdir_p) `echo "$$dist_files" | \
+                           sed -n 's,/[^/]*$$,,p' | sort -u`) ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
index b888a6cd5f494775afde6b0bd0acb800579d911c..7aac954601b4ff6fb9dd1b406eff7db8770182bd 100644 (file)
@@ -366,22 +366,21 @@ distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) ( cd "$(distdir)" && \
+               $(mkdir_p) `echo "$$dist_files" | \
+                           sed -n 's,/[^/]*$$,,p' | sort -u`) ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
index 6cd8ae3d2065ad2ef1d703cc2dbb3c6e866540d7..50f43b00317f23dba507adfaf736de74e8a46cb1 100644 (file)
@@ -240,22 +240,21 @@ CTAGS:
 
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) ( cd "$(distdir)" && \
+               $(mkdir_p) `echo "$$dist_files" | \
+                           sed -n 's,/[^/]*$$,,p' | sort -u`) ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
index d23fc935905b2bb94230169bb9920f7a1ac19dcf..27d52fcdfcc17f2ae56d8526336f84e690cc544d 100644 (file)
@@ -58,9 +58,8 @@ endif %?TOPDIR_P%
 ?DISTDIRS?     $(mkdir_p) %DISTDIRS%
 ##
 ##
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 ##
 ## Yet another hack to support SUN make.
 ##
@@ -75,7 +74,7 @@ endif %?TOPDIR_P%
 ## So let's strip this leading $(srcdir)/ when it exists.  (As far we
 ## know, only SUN make and OSF1/Tru64 make add it.)  Searching whether
 ## the file is to be found in the source or build directory will be
-## done latter.
+## done later.
 ##
 ## In case we are _not_ using SUN or OSF1/Tru64 make, how can we be sure
 ## we are not stripping a legitimate filename that starts with the
@@ -99,13 +98,27 @@ endif %?TOPDIR_P%
 ## above the current directory.  Fortunately, apart from auxdir files which
 ## can be located in .. or ../.., this situation hardly occurs in practice.
 ##
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
 ## Also rewrite $(top_srcdir) (which sometimes appears in DISTFILES, and can
 ## be absolute) by $(top_builddir) (which is always relative).  $(srcdir) will
-## be prepended latter.
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+## be prepended later.
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+## (The second `t' command clears the flag for the next round.)
+##
+## Make the subdirectories for the files.
+## (The DISTDIRS list can be incomplete, because files in subdirectories can
+## be specified for `dist' conditionally.)
+##
+       case $$dist_files in \
+         */*) ( cd "$(distdir)" && \
+               $(mkdir_p) `echo "$$dist_files" | \
+                           sed -n 's,/[^/]*$$,,p' | sort -u`) ;; \
+       esac; \
+##
+##
+       for file in $$dist_files; do \
 ##
 ## Always look for the file in the build directory first.  That way
 ## for something like yacc output we will correctly pick up the latest
@@ -114,26 +127,14 @@ endif %?TOPDIR_P%
 ##
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
 ##
-## Make the subdirectory for the file.  This is going to make `dist'
-## really crawl, but it seems like the only way to do it, given that
-## files in subdirectories can be specified for `dist' conditionally.
-##
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
-##
 ## Use cp, not ln.  There are situations in which "ln" can fail.  For
 ## instance a file to distribute could actually be a cross-filesystem
 ## symlink -- this can easily happen if "gettextize" was run on the
 ## distribution.
 ##
          if test -d $$d/$$file; then \
-## Don't mention $$file in destination argument, since this fails if
-## destination directory already exists.  Also, use `-R' and not `-r'.
+## Don't mention $$file in the destination argument, since this fails if
+## the destination directory already exists.  Also, use `-R' and not `-r'.
 ## `-r' is almost always incorrect.
 ##
 ## If a directory exists both in `.' and $(srcdir), then
@@ -142,6 +143,7 @@ endif %?TOPDIR_P%
 ## source files _and_ generated files.  It is also important when the
 ## directory exists only in $(srcdir), because some vendor Make (such
 ## as Tru64) will magically create an empty directory in `.'
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
@@ -176,9 +178,9 @@ if %?SUBDIRS%
              $(MAKE) $(AM_MAKEFLAGS) \
                top_distdir="$$top_distdir" \
                distdir="$$distdir/$$subdir" \
- ## Disable am__remove_distdir so that sub-packages do not clear a
- ## directory we have already cleared and might even have populated
- ## (e.g. shared AUX dir in the sub-package).
+## Disable am__remove_distdir so that sub-packages do not clear a
+## directory we have already cleared and might even have populated
+## (e.g. shared AUX dir in the sub-package).
                am__remove_distdir=: \
                distdir) \
              || exit 1; \
index 244fbe664620b973ba820c76af7dec50f633326a..78d9f1c26c7556d145b389de82dc0b20c632e8df 100644 (file)
@@ -236,22 +236,21 @@ CTAGS:
 
 distdir: $(DISTFILES)
        $(mkdir_p) $(distdir)/../m4
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) ( cd "$(distdir)" && \
+               $(mkdir_p) `echo "$$dist_files" | \
+                           sed -n 's,/[^/]*$$,,p' | sort -u`) ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
index c4f80cde83bcb324e831d1f12cc80ac98f835293..cbdce5c83d42004bb00e9e71f85e690484bee4e8 100644 (file)
@@ -849,22 +849,21 @@ check-TESTS: $(TESTS)
        else :; fi
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) ( cd "$(distdir)" && \
+               $(mkdir_p) `echo "$$dist_files" | \
+                           sed -n 's,/[^/]*$$,,p' | sort -u`) ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
This page took 0.048973 seconds and 5 git commands to generate.