1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fallback mkdir_p to as_mkdir_p

Assume `mkdir -p` to be race-free on recent systems.
And we do not provide install-sh anyway.
This commit is contained in:
Nobuyoshi Nakada 2022-07-07 13:20:10 +09:00
parent cd94842922
commit 67e54ce408
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
2 changed files with 11 additions and 11 deletions

View file

@ -32,6 +32,7 @@ m4_include([tool/m4/ruby_func_attribute.m4])dnl
m4_include([tool/m4/ruby_mingw32.m4])dnl
m4_include([tool/m4/ruby_prepend_option.m4])dnl
m4_include([tool/m4/ruby_prog_gnu_ld.m4])dnl
m4_include([tool/m4/ruby_prog_makedirs.m4])dnl
m4_include([tool/m4/ruby_replace_funcs.m4])dnl
m4_include([tool/m4/ruby_replace_type.m4])dnl
m4_include([tool/m4/ruby_require_funcs.m4])dnl
@ -491,17 +492,7 @@ AS_CASE(["$target_os"],
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_PROG_MKDIR_P
AS_IF([test "x$MKDIR_P" = "x -d"], [
AS_IF([test x"$as_mkdir_p" != xfalse], [
MKDIR_P='mkdir -p'
echo "use 'mkdir -p' as MKDIR_P"
], [
AC_MSG_ERROR([mkdir -p is required])
])
])
MAKEDIRS="$MKDIR_P"
AC_SUBST(MAKEDIRS)
RUBY_PROG_MAKEDIRS
AC_CHECK_PROG([DTRACE], [${ac_tool_prefix}dtrace], [${ac_tool_prefix}dtrace])
AS_IF([test "$cross_compiling:$ac_cv_prog_DTRACE" = no: -a -n "$ac_tool_prefix"], [

View file

@ -0,0 +1,9 @@
dnl -*- Autoconf -*-
m4_defun([RUBY_PROG_MAKEDIRS],
[m4_bpatsubst(m4_defn([AC_PROG_MKDIR_P]),
[MKDIR_P=\"$ac_install_sh -d\"], [
AS_IF([test "x$MKDIR_P" = "xfalse"], [AC_MSG_ERROR([mkdir -p is required])])
MKDIR_P="mkdir -p"])
]dnl
AC_SUBST(MAKEDIRS, ["$MKDIR_P"])
)