configure: Use the standard MKDIR_P macro to create directories.

This commit is contained in:
Alexandre Julliard 2013-10-04 22:12:22 +02:00
parent 2808ba2108
commit 69b9c4b198
5 changed files with 57 additions and 112 deletions

View File

@ -180,7 +180,7 @@ clean:: $(EXTRASUBDIRS:%=%/__clean__)
# Rules for installing
$(INSTALLDIRS):
$(MKINSTALLDIRS) $@
$(MKDIR_P) -m 755 $@
install install-lib install-dev uninstall::

View File

@ -41,6 +41,7 @@ ARFLAGS = @ARFLAGS@
RANLIB = @RANLIB@
STRIP = @STRIP@
LN_S = @LN_S@
MKDIR_P = @MKDIR_P@
TOOLSDIR = @TOOLSDIR@
LDFLAGS = @LDFLAGS@
PRELINK = @PRELINK@
@ -57,7 +58,6 @@ ALL_MO_FILES = $(LINGUAS:%=@top_builddir@/po/%.mo)
PORCFLAGS = @PORCFLAGS@
CROSSAR = $(CROSSTARGET)-ar
CROSSRANLIB = $(CROSSTARGET)-ranlib
MKINSTALLDIRS = $(top_srcdir)/tools/mkinstalldirs -m 755
WINAPI_CHECK = $(top_srcdir)/tools/winapi/winapi_check
BUILDIMAGE = $(top_srcdir)/tools/buildimage
C2MAN = $(top_srcdir)/tools/c2man.pl

56
configure vendored
View File

@ -731,6 +731,7 @@ INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
LDCONFIG
MKDIR_P
EGREP
GREP
LN_S
@ -5360,6 +5361,48 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
if ${ac_cv_path_mkdir+:} false; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
'mkdir (GNU coreutils) '* | \
'mkdir (coreutils) '* | \
'mkdir (fileutils) '4.1*)
ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
break 3;;
esac
done
done
done
IFS=$as_save_IFS
fi
test -d ./--version && rmdir ./--version
if test "${ac_cv_path_mkdir+set}" = set; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
# As a last resort, use the slow shell script. Don't cache a
# value for MKDIR_P within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the value is a relative name.
MKDIR_P="$ac_install_sh -d"
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
$as_echo "$MKDIR_P" >&6; }
# Extract the first word of "ldconfig", so it can be a program name with args.
set dummy ldconfig; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@ -5402,7 +5445,7 @@ fi
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM="env STRIPPROG=\"\$(STRIP)\" \$(top_srcdir)/tools/install-sh"
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM="STRIPPROG=\"\$(STRIP)\" \$(top_srcdir)/tools/install-sh"
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@ -5496,10 +5539,6 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
case "$INSTALL" in
[\\/$]* | ?:[\\/]* ) ;;
*) INSTALL="\\\$(top_srcdir)/$INSTALL" ;;
esac
for ac_prog in lclint lint
do
@ -18000,6 +18039,7 @@ gives unlimited permission to copy, distribute and modify it."
ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
MKDIR_P='$MKDIR_P'
test -n "\$AWK" || AWK=awk
_ACEOF
@ -18631,6 +18671,11 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
*) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
esac
ac_MKDIR_P=$MKDIR_P
case $MKDIR_P in
[\\/$]* | ?:[\\/]* ) ;;
*/*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
esac
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@ -18685,6 +18730,7 @@ s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |

View File

@ -262,16 +262,12 @@ AC_SUBST(ARFLAGS,rc)
AC_PROG_RANLIB
AC_PROG_LN_S
AC_PROG_EGREP
AC_PROG_MKDIR_P
AC_PATH_PROG(LDCONFIG, ldconfig, true, [/sbin /usr/sbin $PATH])
dnl Use the correct strip to install programs
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM="env STRIPPROG=\"\$(STRIP)\" \$(top_srcdir)/tools/install-sh"
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM="STRIPPROG=\"\$(STRIP)\" \$(top_srcdir)/tools/install-sh"
AC_PROG_INSTALL
dnl Prepend src dir to install path dir if it's a relative path
case "$INSTALL" in
[[\\/$]]* | ?:[[\\/]]* ) ;;
*) INSTALL="\\\$(top_srcdir)/$INSTALL" ;;
esac
dnl Check for lint
AC_CHECK_PROGS(LINT, lclint lint)
@ -2561,7 +2557,7 @@ AH_BOTTOM([#endif /* WINE_CROSSTEST */
#endif /* __WINE_CONFIG_H */])
AC_CONFIG_COMMANDS([include/stamp-h], [echo timestamp > include/stamp-h])
_AS_ECHO_N([creating Makefile rules...])
AS_ECHO_N("creating Makefile rules...") >&AS_MESSAGE_FD
WINE_APPEND_RULE([
# Rules automatically generated by configure
@ -3423,7 +3419,7 @@ clean::
\$(RM) fonts server tools $with_wine64/loader/wine $with_wine64/loader/wine-preloader])
fi
_AS_ECHO([ done])
AS_ECHO(" done") >&AS_MESSAGE_FD
AC_OUTPUT
if test "$no_create" = "yes"

View File

@ -1,97 +0,0 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case "${1}" in
-h | --help | --h* ) # -h for help
echo "${usage}" 1>&2; exit 0 ;;
-m ) # -m PERM arg
shift
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
dirmode="${1}"
shift ;;
-- ) shift; break ;; # stop option processing
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
* ) break ;; # first non-opt arg
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
case $dirmode in
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi ;;
*)
# We cannot trust mkdir to set the proper permissions on
# parent directories. So create them manually.
;;
esac
for file
do
case "$file" in
/* ) pathcomp="/" ;;
-* ) pathcomp="./" ;;
* ) pathcomp="" ;;
esac
saved_IFS="$IFS"
IFS="/"
for d in $file
do
IFS="$saved_IFS"
if test -n "$d"; then
pathcomp="$pathcomp$d"
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
break
elif test -n "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test -n "$lasterr"; then
errstatus=$lasterr
break
fi
fi
fi
pathcomp="$pathcomp/"
fi
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 3
# End:
# mkinstalldirs ends here