From: Alexandre Duret-Lutz Date: Sat, 19 Aug 2006 15:55:53 +0000 (+0000) Subject: * Makefile.am (maintainer-check): Check for mkdir_p. X-Git-Tag: Release-1-9b~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5358968b3ce766396ba5de76eb42454f835b827;p=thirdparty%2Fautomake.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 7bfc34060..19ceac705 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ 2006-08-19 Alexandre Duret-Lutz + * 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 diff --git a/Makefile.am b/Makefile.am index ee9c8021c..13ff19546 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/Makefile.in b/Makefile.in index 689dad092..bda87843e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 42db3a259..1a74f3f40 100644 --- 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. New in 1.9: diff --git a/configure b/configure index 1e7b7f958..207420008 100755 --- 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 diff --git a/doc/Makefile.in b/doc/Makefile.in index 2e1238066..d2ad92573 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -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) \ diff --git a/doc/automake.texi b/doc/automake.texi index 675df0820..4900a06a0 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -3886,6 +3886,33 @@ define @code{GWINSZ_IN_SYS_IOCTL}. Otherwise @code{TIOCGWINSZ} can be found in @file{}. 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 diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in index 4bbea3f2a..652fb0593 100644 --- a/lib/Automake/Makefile.in +++ b/lib/Automake/Makefile.in @@ -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 diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in index 0926c81d1..e9e4ab100 100644 --- a/lib/Automake/tests/Makefile.in +++ b/lib/Automake/tests/Makefile.in @@ -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; \ diff --git a/lib/Makefile.in b/lib/Makefile.in index 50211f85a..6dead8350 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -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 diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in index 1f2db9510..7b15627c9 100644 --- a/lib/am/Makefile.in +++ b/lib/am/Makefile.in @@ -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 diff --git a/lib/am/data.am b/lib/am/data.am index a1a2649bd..a35d71547 100644 --- a/lib/am/data.am +++ b/lib/am/data.am @@ -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. diff --git a/lib/am/distdir.am b/lib/am/distdir.am index d3b3fb2ee..0c76017b1 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -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 \ diff --git a/lib/am/install.am b/lib/am/install.am index b9a8ac1b5..1952e994b 100644 --- a/lib/am/install.am +++ b/lib/am/install.am @@ -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% diff --git a/lib/am/java.am b/lib/am/java.am index 8471eecb5..da7891bf9 100644 --- a/lib/am/java.am +++ b/lib/am/java.am @@ -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. diff --git a/lib/am/libs.am b/lib/am/libs.am index 402a29716..4b71218c9 100644 --- a/lib/am/libs.am +++ b/lib/am/libs.am @@ -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 \ diff --git a/lib/am/lisp.am b/lib/am/lisp.am index 58b9dae24..e5b3f8e69 100644 --- a/lib/am/lisp.am +++ b/lib/am/lisp.am @@ -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. diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am index 4be1e6d66..97dcefbed 100644 --- a/lib/am/ltlib.am +++ b/lib/am/ltlib.am @@ -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 \ diff --git a/lib/am/mans.am b/lib/am/mans.am index 209a39f69..29b8fea72 100644 --- a/lib/am/mans.am +++ b/lib/am/mans.am @@ -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. diff --git a/lib/am/progs.am b/lib/am/progs.am index 04696cbd9..1973c0353 100644 --- a/lib/am/progs.am +++ b/lib/am/progs.am @@ -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 \ diff --git a/lib/am/python.am b/lib/am/python.am index 07932b188..a47737436 100644 --- a/lib/am/python.am +++ b/lib/am/python.am @@ -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\ diff --git a/lib/am/scripts.am b/lib/am/scripts.am index 57356cf30..6d2c400eb 100644 --- a/lib/am/scripts.am +++ b/lib/am/scripts.am @@ -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. diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index dd2fdec66..853b57054 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -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) \ diff --git a/m4/Makefile.in b/m4/Makefile.in index 4308e205b..2a285edda 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -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 diff --git a/m4/mkdirp.m4 b/m4/mkdirp.m4 index 70a551b65..553cac21d 100644 --- a/m4/mkdirp.m4 +++ b/m4/mkdirp.m4 @@ -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 ]) diff --git a/tests/Makefile.in b/tests/Makefile.in index 46b74b4c3..0aed6eee7 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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; \ diff --git a/tests/distdir.test b/tests/distdir.test index 4589cbbc1..e723743d7 100755 --- a/tests/distdir.test +++ b/tests/distdir.test @@ -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` diff --git a/tests/instman.test b/tests/instman.test index a9566f2a8..8afe9e968 100755 --- a/tests/instman.test +++ b/tests/instman.test @@ -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. # @@ -18,19 +19,23 @@ # 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 . . ./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 diff --git a/tests/txinfo21.test b/tests/txinfo21.test index c9e704d06..5bbcc3bca 100755 --- a/tests/txinfo21.test +++ b/tests/txinfo21.test @@ -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"