summaryrefslogtreecommitdiff
path: root/m4/mkdirp.m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2012-10-22 16:14:49 +0200
committerJim Meyering <jim@meyering.net>2012-10-26 12:48:38 +0200
commitdf23dafc30d54164035281aec1f6ce14d0f4b0fc (patch)
tree78c472187cb4614cde335fdef589e44561742c5d /m4/mkdirp.m4
parent7411adcdad588acf2a167dd05e5a942fa752e90e (diff)
downloadautomake-df23dafc30d54164035281aec1f6ce14d0f4b0fc.tar.gz
compat: reinstate AM_PROG_MKDIR_P, for gettext
Do not remove AM_PROG_MKDIR_P just yet. gettext (latest from git) still AC_REQUIRE's AM_PROG_MKDIR_P via its intl.m4 and po.m4 files, which are pulled into *many* projects. When I try to build one of those projects (coreutils) using the latest from automake.git/master, I see this failure: $ aclocal -I m4 configure.ac:477: warning: AM_PROG_MKDIR_P is m4_require'd \ but not m4_defun'd m4/po.m4:23: AM_PO_SUBDIRS is expanded from... m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from... configure.ac:477: the top level That is because AM_PROG_MKDIR_P was removed (via commit v1.12-20-g8a1c64f) in preparation for the next release of automake. * NEWS: Remove the paragraph that announced the removal of AM_PROG_MKDIR_P. * Makefile.am (dist_automake_ac_DATA): Add m4/mkdirp.m4. * m4/mkdirp.m4: Re-add file. * t/mkdirp-deprecation.sh: Likewise. * t/list-of-tests.mk: Add it. * automake.in: Restore removed code, and adjust comments, s/1.13/1.14/ to reflect new plan for removal. * doc/automake.texi (Obsolete Macros): Restore the section, but now with only one entry: the one for AM_PROG_MKDIR_P.
Diffstat (limited to 'm4/mkdirp.m4')
-rw-r--r--m4/mkdirp.m431
1 files changed, 31 insertions, 0 deletions
diff --git a/m4/mkdirp.m4 b/m4/mkdirp.m4
new file mode 100644
index 000000000..93c12b0b7
--- /dev/null
+++ b/m4/mkdirp.m4
@@ -0,0 +1,31 @@
+## -*- Autoconf -*-
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for 'mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl FIXME to be removed in Automake 1.14.
+AC_DIAGNOSE([obsolete],
+[$0: this macro is deprecated, and will soon be removed.
+You should use the Autoconf-provided 'AC][_PROG_MKDIR_P' macro instead,
+and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.])
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])