]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* m4/mkdirp.m4 (AM_PROG_MKDIR_P): Prefix mkdir_p with
authorAlexandre Duret-Lutz <adl@gnu.org>
Sun, 20 Aug 2006 14:28:43 +0000 (14:28 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sun, 20 Aug 2006 14:28:43 +0000 (14:28 +0000)
$(top_builddir)/ if it is a relative directory.

ChangeLog
configure
m4/mkdirp.m4

index d551bce188730fda92a6a62b0d838d34a7b05d52..145fe90d17e1e67930ec3869264abde04d3dd7b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-20  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       * m4/mkdirp.m4 (AM_PROG_MKDIR_P): Prefix mkdir_p with
+       $(top_builddir)/ if it is a relative directory.
+
 2006-08-19  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * lib/am/lex.am, lib/am/yacc.am: Drop the inline rules, always use
index 20742000855eb1342fe243bae2581dddbb2de856..082c7eac6f1caaac2a9c0e79e98c44dc3c1b2cce 100755 (executable)
--- a/configure
+++ b/configure
@@ -1928,6 +1928,10 @@ fi
 echo "${ECHO_T}$MKDIR_P" >&6; }
 
 mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  \\/$* | ?:\\/*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
 
 for ac_prog in gawk mawk nawk awk
 do
index 553cac21d14407ce80b1d71c243bfdff043a412b..a120b4aa2a773387c6ead79fd349f42b39642747 100644 (file)
 AC_DEFUN([AM_PROG_MKDIR_P],
 [AC_PREREQ([2.60])dnl
 AC_REQUIRE([AC_PROG_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.
+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
 ])