* m4/mkdirp.m4 (AM_PROG_MKDIR_P): Rewrite using AC_PROG_MKDIR_P.
[platform/upstream/automake.git] / lib / Automake / tests / Makefile.in
index 6051812..516571e 100644 (file)
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -72,6 +72,7 @@ LIBS = @LIBS@
 LN = @LN@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MODIFICATION_DELAY = @MODIFICATION_DELAY@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -178,7 +179,7 @@ CTAGS:
 
 
 check-TESTS: $(TESTS)
-       @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+       @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[        ]'; \
        srcdir=$(srcdir); export srcdir; \
        list='$(TESTS)'; \
        if test -n "$$list"; then \
@@ -189,7 +190,7 @@ check-TESTS: $(TESTS)
            if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
              all=`expr $$all + 1`; \
              case " $(XFAIL_TESTS) " in \
-             *" $$tst "*) \
+             *$$ws$$tst$$ws*) \
                xpass=`expr $$xpass + 1`; \
                failed=`expr $$failed + 1`; \
                echo "XPASS: $$tst"; \
@@ -201,7 +202,7 @@ check-TESTS: $(TESTS)
            elif test $$? -ne 77; then \
              all=`expr $$all + 1`; \
              case " $(XFAIL_TESTS) " in \
-             *" $$tst "*) \
+             *$$ws$$tst$$ws*) \
                xfail=`expr $$xfail + 1`; \
                echo "XFAIL: $$tst"; \
              ;; \
@@ -251,22 +252,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; \