* Makefile.am (maintainer-check): Check for mkdir_p.
authorAlexandre Duret-Lutz <adl@gnu.org>
Sat, 19 Aug 2006 15:55:53 +0000 (15:55 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sat, 19 Aug 2006 15:55:53 +0000 (15:55 +0000)
* automake.texi (Obsolete macros): Document AM_PROG_MKDIR_P.
* lib/am/data.am, lib/am/distdir.am, lib/am/install.am,
lib/am/java.am, lib/am/libs.am, lib/am/lisp.am, lib/am/ltlib.am,
lib/am/mans.am, lib/am/progs.am, lib/am/python.am,
lib/am/scripts.am, lib/am/texinfos.am: Use MKDIR_P instead of mkdir_p.
* m4/mkdirp.m4 (AM_PROG_MKDIR_P): Define mkdir_p using $MKDIR_P, not
as '$(MKDIR_P)', otherwise it will break `Makefile.in's that use
mkdir_p without defining MKDIR_P.
* tests/distdir.test, tests/instman.test, tests/txinfo21.test:
Adjust.

29 files changed:
ChangeLog
Makefile.am
Makefile.in
NEWS
configure
doc/Makefile.in
doc/automake.texi
lib/Automake/Makefile.in
lib/Automake/tests/Makefile.in
lib/Makefile.in
lib/am/Makefile.in
lib/am/data.am
lib/am/distdir.am
lib/am/install.am
lib/am/java.am
lib/am/libs.am
lib/am/lisp.am
lib/am/ltlib.am
lib/am/mans.am
lib/am/progs.am
lib/am/python.am
lib/am/scripts.am
lib/am/texinfos.am
m4/Makefile.in
m4/mkdirp.m4
tests/Makefile.in
tests/distdir.test
tests/instman.test
tests/txinfo21.test

index 7bfc340..19ceac7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2006-08-19  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       * Makefile.am (maintainer-check): Check for mkdir_p.
+       * automake.texi (Obsolete macros): Document AM_PROG_MKDIR_P.
+       * lib/am/data.am, lib/am/distdir.am, lib/am/install.am,
+       lib/am/java.am, lib/am/libs.am, lib/am/lisp.am, lib/am/ltlib.am,
+       lib/am/mans.am, lib/am/progs.am, lib/am/python.am,
+       lib/am/scripts.am, lib/am/texinfos.am: Use MKDIR_P instead of mkdir_p.
+       * m4/mkdirp.m4 (AM_PROG_MKDIR_P): Define mkdir_p using $MKDIR_P, not
+       as '$(MKDIR_P)', otherwise it will break `Makefile.in's that use
+       mkdir_p without defining MKDIR_P.
+       * tests/distdir.test, tests/instman.test, tests/txinfo21.test:
+       Adjust.
+
        * Makefile.am (SUBDIRS): Build lib first, for lib/Automake/Config.pm.
        * configure.ac (ACLOCAL): Use --acdir=m4 in addition to
        -I m4.  Running aclocal during the rebuild rules will fail
index ee9c802..13ff195 100644 (file)
@@ -268,6 +268,10 @@ maintainer-check: automake aclocal
          echo 'Do not use egrep or fgrep in the above files, they are not portable.' 1>&2; \
          exit 1; \
        fi
+       @if grep 'mkdir_p' $(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
+         echo 'Do not use mkdir_p in the above files, use MKDIR_P.' 1>&2; \
+         exit 1; \
+       fi
 ## Try to make sure all @...@ substitutions are covered by our
 ## substitution rule.
        @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' aclocal | wc -l` -ne 0; then \
index 689dad0..bda8784 100644 (file)
@@ -234,7 +234,7 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 install-binSCRIPTS: $(bin_SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
        @list='$(bin_SCRIPTS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          if test -f $$d$$p; then \
@@ -393,7 +393,7 @@ distdir: $(DISTFILES)
          sed -e "s|^$$srcdirstrip/||;t" \
              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
        case $$dist_files in \
-         */*) $(mkdir_p) `echo "$$dist_files" | \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
                           sort -u` ;; \
        esac; \
@@ -414,7 +414,7 @@ distdir: $(DISTFILES)
        list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
            distdir=`$(am__cd) $(distdir) && pwd`; \
            top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -535,7 +535,7 @@ all-am: Makefile $(SCRIPTS)
 installdirs: installdirs-recursive
 installdirs-am:
        for dir in "$(DESTDIR)$(bindir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-recursive
 install-exec: install-exec-recursive
@@ -806,6 +806,10 @@ maintainer-check: automake aclocal
          echo 'Do not use egrep or fgrep in the above files, they are not portable.' 1>&2; \
          exit 1; \
        fi
+       @if grep 'mkdir_p' $(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
+         echo 'Do not use mkdir_p in the above files, use MKDIR_P.' 1>&2; \
+         exit 1; \
+       fi
        @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' aclocal | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in aclocal" 1>&2; \
          exit 1; \
diff --git a/NEWS b/NEWS
index 42db3a2..1a74f3f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -126,6 +126,13 @@ New in 1.9a:
   - Automake installs an "Hello World!" example package in $(docdir).
     This example is used thorough the new "Autotools Introduction"
     chapter of the manual.
+
+  - Automake now uses AC_PROG_MKDIR_P (new in Autoconf 2.60), and uses
+    $(MKDIR_P) instead of $(mkdir_p) to create directories.  The
+    $(mkdir_p) variable is still defined (to the same value as
+    $(MKDIR_P)) but should be considered obsolete.  If you are using
+    $(mkdir_p) in some of your rules, please plan to update them to
+    $(MKDIR_P) at some point.
 \f
 New in 1.9:
 
index 1e7b7f9..2074200 100755 (executable)
--- a/configure
+++ b/configure
@@ -1927,7 +1927,7 @@ fi
 { echo "$as_me:$LINENO: result: $MKDIR_P" >&5
 echo "${ECHO_T}$MKDIR_P" >&6; }
 
-mkdir_p='$(MKDIR_P)'
+mkdir_p="$MKDIR_P"
 
 for ac_prog in gawk mawk nawk awk
 do
index 2e12380..d2ad925 100644 (file)
@@ -382,7 +382,7 @@ maintainer-clean-aminfo:
        done
 install-dist_docDATA: $(dist_doc_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
+       test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
        @list='$(dist_doc_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@ -454,7 +454,7 @@ distdir: $(DISTFILES)
          sed -e "s|^$$srcdirstrip/||;t" \
              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
        case $$dist_files in \
-         */*) $(mkdir_p) `echo "$$dist_files" | \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
                           sort -u` ;; \
        esac; \
@@ -480,7 +480,7 @@ check: check-am
 all-am: Makefile $(INFO_DEPS) $(DATA)
 installdirs:
        for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(docdir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-am
 install-exec: install-exec-am
@@ -532,7 +532,7 @@ install-dvi: install-dvi-am
 
 install-dvi-am: $(DVIS)
        @$(NORMAL_INSTALL)
-       test -z "$(dvidir)" || $(mkdir_p) "$(DESTDIR)$(dvidir)"
+       test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
        @list='$(DVIS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@ -545,13 +545,13 @@ install-html: install-html-am
 
 install-html-am: $(HTMLS)
        @$(NORMAL_INSTALL)
-       test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+       test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
        @list='$(HTMLS)'; for p in $$list; do \
          if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
          if test -d "$$d$$p"; then \
-           echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
-           $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+           echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
+           $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
            echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
            $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
          else \
@@ -563,7 +563,7 @@ install-info: install-info-am
 
 install-info-am: $(INFO_DEPS)
        @$(NORMAL_INSTALL)
-       test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
+       test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
        list='$(INFO_DEPS)'; \
        for file in $$list; do \
@@ -597,7 +597,7 @@ install-pdf: install-pdf-am
 
 install-pdf-am: $(PDFS)
        @$(NORMAL_INSTALL)
-       test -z "$(pdfdir)" || $(mkdir_p) "$(DESTDIR)$(pdfdir)"
+       test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
        @list='$(PDFS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@ -608,7 +608,7 @@ install-ps: install-ps-am
 
 install-ps-am: $(PSS)
        @$(NORMAL_INSTALL)
-       test -z "$(psdir)" || $(mkdir_p) "$(DESTDIR)$(psdir)"
+       test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
        @list='$(PSS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
index 675df08..4900a06 100644 (file)
@@ -3886,6 +3886,33 @@ define @code{GWINSZ_IN_SYS_IOCTL}.  Otherwise @code{TIOCGWINSZ} can be
 found in @file{<termios.h>}.  This macro is obsolete, you should
 use Autoconf's @code{AC_HEADER_TIOCGWINSZ} instead.
 
+@item AM_PROG_MKDIR_P
+@acindex AM_PROG_MKDIR_P
+@cindex @code{mkdir -p}, macro check
+@vindex MKDIR_P
+@vindex mkdir_p
+
+From Automake 1.8 to 1.9.6 this macro used to define the output
+variable @code{mkdir_p} to one of @code{mkdir -p}, @code{install.sh
+-d}, or @code{mkinstalldirs}.
+
+Nowadays Autoconf provides a similar functionality with
+@code{AC_PROG_MKDIR_P} (@pxref{Particular Programs, , Particular
+Program Checks, autoconf, The Autoconf Manual}), however this defines
+the output variable @code{MKDIR_P} instead.  Therefore
+@code{AM_PROG_MKDIR_P} has been rewritten as a thin wrapper around
+@code{AC_PROG_MKDIR_P} to define @code{mkdir_p} to the same value as
+@code{MKDIR_P} for backward compatibility.
+
+If you are using Automake, there is normally no reason to call this
+macro, because @code{AM_INIT_AUTOMAKE} already does so.  However, make
+sure that the custom rules in your @file{Makefile}s use
+@code{$(MKDIR_P)} and not @code{$(mkdir_p)}.  Even if both variables
+still work, the latter should be considered obsolete.
+
+If you are not using Automake, please call @code{AC_PROG_MKDIR_P}
+instead of @code{AM_PROG_MKDIR_P}.
+
 @item AM_SYS_POSIX_TERMIOS
 @acindex AM_SYS_POSIX_TERMIOS
 @cindex POSIX termios headers
index 4bbea3f..652fb05 100644 (file)
@@ -226,7 +226,7 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-dist_perllibDATA: $(dist_perllib_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(perllibdir)" || $(mkdir_p) "$(DESTDIR)$(perllibdir)"
+       test -z "$(perllibdir)" || $(MKDIR_P) "$(DESTDIR)$(perllibdir)"
        @list='$(dist_perllib_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@ -243,7 +243,7 @@ uninstall-dist_perllibDATA:
        done
 install-nodist_perllibDATA: $(nodist_perllib_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(perllibdir)" || $(mkdir_p) "$(DESTDIR)$(perllibdir)"
+       test -z "$(perllibdir)" || $(MKDIR_P) "$(DESTDIR)$(perllibdir)"
        @list='$(nodist_perllib_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@ -398,7 +398,7 @@ distdir: $(DISTFILES)
          sed -e "s|^$$srcdirstrip/||;t" \
              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
        case $$dist_files in \
-         */*) $(mkdir_p) `echo "$$dist_files" | \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
                           sort -u` ;; \
        esac; \
@@ -419,7 +419,7 @@ distdir: $(DISTFILES)
        list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
            distdir=`$(am__cd) $(distdir) && pwd`; \
            top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -438,7 +438,7 @@ all-am: Makefile $(DATA)
 installdirs: installdirs-recursive
 installdirs-am:
        for dir in "$(DESTDIR)$(perllibdir)" "$(DESTDIR)$(perllibdir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-recursive
 install-exec: install-exec-recursive
index 0926c81..e9e4ab1 100644 (file)
@@ -259,7 +259,7 @@ distdir: $(DISTFILES)
          sed -e "s|^$$srcdirstrip/||;t" \
              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
        case $$dist_files in \
-         */*) $(mkdir_p) `echo "$$dist_files" | \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
                           sort -u` ;; \
        esac; \
index 50211f8..6dead83 100644 (file)
@@ -202,7 +202,7 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-dist_pkgvdataDATA: $(dist_pkgvdata_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(pkgvdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgvdatadir)"
+       test -z "$(pkgvdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgvdatadir)"
        @list='$(dist_pkgvdata_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@ -219,7 +219,7 @@ uninstall-dist_pkgvdataDATA:
        done
 install-dist_scriptDATA: $(dist_script_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(scriptdir)" || $(mkdir_p) "$(DESTDIR)$(scriptdir)"
+       test -z "$(scriptdir)" || $(MKDIR_P) "$(DESTDIR)$(scriptdir)"
        @list='$(dist_script_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@ -374,7 +374,7 @@ distdir: $(DISTFILES)
          sed -e "s|^$$srcdirstrip/||;t" \
              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
        case $$dist_files in \
-         */*) $(mkdir_p) `echo "$$dist_files" | \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
                           sort -u` ;; \
        esac; \
@@ -395,7 +395,7 @@ distdir: $(DISTFILES)
        list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
            distdir=`$(am__cd) $(distdir) && pwd`; \
            top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -414,7 +414,7 @@ all-am: Makefile $(DATA)
 installdirs: installdirs-recursive
 installdirs-am:
        for dir in "$(DESTDIR)$(pkgvdatadir)" "$(DESTDIR)$(scriptdir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-recursive
 install-exec: install-exec-recursive
index 1f2db95..7b15627 100644 (file)
@@ -218,7 +218,7 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-dist_amDATA: $(dist_am_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(amdir)" || $(mkdir_p) "$(DESTDIR)$(amdir)"
+       test -z "$(amdir)" || $(MKDIR_P) "$(DESTDIR)$(amdir)"
        @list='$(dist_am_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@ -248,7 +248,7 @@ distdir: $(DISTFILES)
          sed -e "s|^$$srcdirstrip/||;t" \
              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
        case $$dist_files in \
-         */*) $(mkdir_p) `echo "$$dist_files" | \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
                           sort -u` ;; \
        esac; \
@@ -271,7 +271,7 @@ check: check-am
 all-am: Makefile $(DATA)
 installdirs:
        for dir in "$(DESTDIR)$(amdir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-am
 install-exec: install-exec-am
index a1a2649..a35d715 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004
+## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004, 2006
 ## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -33,7 +33,7 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 ?!EXEC?.PHONY install-data-am: install-%DIR%%PRIMARY%
 install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(mkdir_p) "$(DESTDIR)$(%NDIR%dir)"
+       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 ?!BASE?        @$(am__vpath_adj_setup) \
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
index d3b3fb2..0c76017 100644 (file)
@@ -107,7 +107,7 @@ endif %?TOPDIR_P%
 ## Make the subdirectories for the files.
 ##
        case $$dist_files in \
-         */*) $(mkdir_p) `echo "$$dist_files" | \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
                           sort -u` ;; \
        esac; \
@@ -165,7 +165,7 @@ if %?SUBDIRS%
        list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
            distdir=`$(am__cd) $(distdir) && pwd`; \
            top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -367,7 +367,7 @@ distcheck: dist
 ## $(distdir) is).
          && ({ \
 ## Build the directory, so we can cd into it even if `make install'
-## didn't create it.  Use mkdir, not $(mkdir_p) because we want to
+## didn't create it.  Use mkdir, not $(MKDIR_P) because we want to
 ## fail if the directory already exists (PR/413).
               (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
               && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
index b9a8ac1..1952e99 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2002, 2003, 2004  Free Software Foundation, Inc.
+## Copyright (C) 2001, 2002, 2003, 2004, 2006  Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 ## ----------------------------------------- ##
 
 ## The reason we loop over %am__installdirs% (instead of simply running
-## `$(mkdir_p) %am__installdirs%') is that directories variable such as
+## `$(MKDIR_P) %am__installdirs%') is that directories variable such as
 ## `"$(DESTDIR)$(mydir)"' can potentially expand to `""' if `$(mydir)'
 ## is conditionally defined.  BTW, those directories are quoted in
 ## order to support installation paths with spaces.
@@ -32,13 +32,13 @@ RECURSIVE_TARGETS += installdirs-recursive
 installdirs: installdirs-recursive
 installdirs-am:%installdirs-local%
 ?am__installdirs?      for dir in %am__installdirs%; do \
-?am__installdirs?        test -z "$$dir" || $(mkdir_p) "$$dir"; \
+?am__installdirs?        test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 ?am__installdirs?      done
 else !%?SUBDIRS%
 .PHONY: installdirs
 installdirs:%installdirs-local%
 ?am__installdirs?      for dir in %am__installdirs%; do \
-?am__installdirs?        test -z "$$dir" || $(mkdir_p) "$$dir"; \
+?am__installdirs?        test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 ?am__installdirs?      done
 endif !%?SUBDIRS%
 
index 8471eec..da7891b 100644 (file)
@@ -1,5 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1998, 1999, 2001, 2003, 2004 Free Software Foundation, Inc.
+## Copyright (C) 1998, 1999, 2001, 2003, 2004, 2006 Free Software
+## Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -47,7 +48,7 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 ?!EXEC?.PHONY install-data-am: install-%DIR%JAVA
 install-%DIR%JAVA: class%DIR%.stamp
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(mkdir_p) "$(DESTDIR)$(%NDIR%dir)"
+       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 ## A single .java file can be compiled into multiple .class files.  So
 ## we just install all the .class files that got built into this
 ## directory.  This is not optimal, but will have to do for now.
index 402a297..4b71218 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004
+## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004, 2006
 ## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -33,7 +33,7 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 ?!EXEC?.PHONY install-data-am: install-%DIR%LIBRARIES
 install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(mkdir_p) "$(DESTDIR)$(%NDIR%dir)"
+       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
        @list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
index 58b9dae..e5b3f8e 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+## Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 ## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -90,7 +90,7 @@ install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
        @$(NORMAL_INSTALL)
 ## Do not install anything if EMACS was not found.
        @if test "$(EMACS)" != no; then \
-         test -z "$(%NDIR%dir)" || $(mkdir_p) "$(DESTDIR)$(%NDIR%dir)"; \
+         test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"; \
 ?!BASE?          $(am__vpath_adj_setup) \
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
index 4be1e6d..97dcefb 100644 (file)
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2005
-## Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004,
+## 2005, 2006 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 ?!EXEC?.PHONY install-data-am: install-%DIR%LTLIBRARIES
 install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(mkdir_p) "$(DESTDIR)$(%NDIR%dir)"
+       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
        @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
index 209a39f..29b8fea 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1998, 2001, 2003, 2004 Free Software Foundation, Inc.
+## Copyright (C) 1998, 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ man%SECTION%dir = $(mandir)/man%SECTION%
 .PHONY install-man: install-man%SECTION%
 install-man%SECTION%: $(man%SECTION%_MANS) $(man_MANS)
        @$(NORMAL_INSTALL)
-       test -z "$(man%SECTION%dir)" || $(mkdir_p) "$(DESTDIR)$(man%SECTION%dir)"
+       test -z "$(man%SECTION%dir)" || $(MKDIR_P) "$(DESTDIR)$(man%SECTION%dir)"
        @list='$(man%SECTION%_MANS) $(dist_man%SECTION%_MANS) $(nodist_man%SECTION%_MANS)'; \
 ## Extract all items from man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
index 04696cb..1973c03 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004
+## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2006
 ##  Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -30,7 +30,7 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 ?!EXEC?.PHONY install-data-am: install-%DIR%PROGRAMS
 install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(mkdir_p) "$(DESTDIR)$(%NDIR%dir)"
+       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
        @list='$(%DIR%_PROGRAMS)'; for p in $$list; do \
index 07932b1..a477374 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1999, 2001, 2003, 2004 Free Software Foundation, Inc.
+## Copyright (C) 1999, 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 ?!EXEC?.PHONY install-data-am: install-%DIR%PYTHON
 install-%DIR%PYTHON: $(%DIR%_PYTHON)
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(mkdir_p) "$(DESTDIR)$(%NDIR%dir)"
+       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 ?!BASE?        @$(am__vpath_adj_setup) \
 ?!BASE?        list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
 ?BASE? @list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
index 57356cf..6d2c400 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004
+## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004, 2006
 ## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -36,7 +36,7 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 ?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
 install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(mkdir_p) "$(DESTDIR)$(%NDIR%dir)"
+       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 ?!BASE?        @$(am__vpath_adj_setup) \
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
index dd2fdec..853b570 100644 (file)
@@ -145,7 +145,7 @@ include inst-vars.am
 
 install-dvi-am: $(DVIS)
        @$(NORMAL_INSTALL)
-       test -z "$(dvidir)" || $(mkdir_p) "$(DESTDIR)$(dvidir)"
+       test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
        @list='$(DVIS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@ -155,13 +155,13 @@ install-dvi-am: $(DVIS)
 
 install-html-am: $(HTMLS)
        @$(NORMAL_INSTALL)
-       test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+       test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
        @list='$(HTMLS)'; for p in $$list; do \
          if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
          if test -d "$$d$$p"; then \
-           echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
-           $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+           echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
+           $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
            echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
            $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
          else \
@@ -172,7 +172,7 @@ install-html-am: $(HTMLS)
 
 install-info-am: $(INFO_DEPS)
        @$(NORMAL_INSTALL)
-       test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
+       test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
        list='$(INFO_DEPS)'; \
        for file in $$list; do \
@@ -232,7 +232,7 @@ install-info-am: $(INFO_DEPS)
 
 install-pdf-am: $(PDFS)
        @$(NORMAL_INSTALL)
-       test -z "$(pdfdir)" || $(mkdir_p) "$(DESTDIR)$(pdfdir)"
+       test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
        @list='$(PDFS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@ -242,7 +242,7 @@ install-pdf-am: $(PDFS)
 
 install-ps-am: $(PSS)
        @$(NORMAL_INSTALL)
-       test -z "$(psdir)" || $(mkdir_p) "$(DESTDIR)$(psdir)"
+       test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
        @list='$(PSS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
index 4308e20..2a285ed 100644 (file)
@@ -214,7 +214,7 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-dist_m4dataDATA: $(dist_m4data_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(m4datadir)" || $(mkdir_p) "$(DESTDIR)$(m4datadir)"
+       test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)"
        @list='$(dist_m4data_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@ -244,7 +244,7 @@ distdir: $(DISTFILES)
          sed -e "s|^$$srcdirstrip/||;t" \
              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
        case $$dist_files in \
-         */*) $(mkdir_p) `echo "$$dist_files" | \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
                           sort -u` ;; \
        esac; \
@@ -267,7 +267,7 @@ check: check-am
 all-am: Makefile $(DATA)
 installdirs:
        for dir in "$(DESTDIR)$(m4datadir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-am
 install-exec: install-exec-am
index 70a551b..553cac2 100644 (file)
@@ -11,5 +11,9 @@
 AC_DEFUN([AM_PROG_MKDIR_P],
 [AC_PREREQ([2.60])dnl
 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-AC_SUBST([mkdir_p], ['$(MKDIR_P)'])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.
+dnl We now use MKDIR_P, while keeping a definition of mkdir_p for
+dnl backward compatibility. Do not define mkdir_p as $(MKDIR_P) for
+dnl the sake of Makefile.ins that do not define MKDIR_P.
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
 ])
index 46b74b4..0aed6ee 100644 (file)
@@ -863,7 +863,7 @@ distdir: $(DISTFILES)
          sed -e "s|^$$srcdirstrip/||;t" \
              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
        case $$dist_files in \
-         */*) $(mkdir_p) `echo "$$dist_files" | \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
                           sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
                           sort -u` ;; \
        esac; \
index 4589cbb..e723743 100755 (executable)
@@ -54,11 +54,11 @@ test -d foo && exit 1
 
 rm -rf distdir-1.0
 # Remove the dot from VERSION for the next grep.
-VERSION=10 mkdir_p='echo mkdir_p' $MAKE -e distdir >make.log || :
+VERSION=10 MKDIR_P='echo MKDIR_P' $MAKE -e distdir >make.log || :
 
 # Make sure no `./' appear in the directory names.  srcdir is `..', so
 # this also checks that no directory is created in the source tree.
-grep 'mkdir_p.*\.' make.log && exit 1
+grep 'MKDIR_P.*\.' make.log && exit 1
 
 cd ..
 ./configure --prefix `pwd`
index a9566f2..8afe9e9 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2001, 2002, 2003, 2006 Free Software
+# Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-# Test to make sure mkdir_p invocation correct in install-man
+# Make sure the MKDIR_P invocation is correct in install-man
 # target.  Bug reported by Gordon Irlam <gordoni@cygnus.com>.
 
 . ./defs || exit 1
 
+set -e
+
+echo AC_OUTPUT >> configure.in
+
 cat > Makefile.am << 'EOF'
 man_MANS = frob.8
 EOF
 
 : > frob.8
 
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+$ACLOCAL
+$AUTOMAKE
 
-grep '[^(/]mkdir_p' Makefile.in > out || exit 1
+grep '[^(/]MKDIR_P' Makefile.in > out
 test `wc -l < out` -eq 1
index c9e704d..5bbcc3b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -77,7 +77,7 @@ cat > rec/Makefile.am << 'END'
 info_TEXINFOS = main3.texi
 
 install-pdf-local:
-       @$(mkdir_p) "$(pdfdir)"
+       @$(MKDIR_P) "$(pdfdir)"
        :> "$(pdfdir)/hello"
 uninstall-local:
        rm -f "$(pdfdir)/hello"