aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--m4/mkdirp.m464
1 files changed, 0 insertions, 64 deletions
diff --git a/m4/mkdirp.m4 b/m4/mkdirp.m4
deleted file mode 100644
index e5b924ba2..000000000
--- a/m4/mkdirp.m4
+++ /dev/null
@@ -1,64 +0,0 @@
1## -*- Autoconf -*-
2# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
3#
4# This file is free software; the Free Software Foundation
5# gives unlimited permission to copy and/or distribute it,
6# with or without modifications, as long as this notice is preserved.
7
8# AM_PROG_MKDIR_P
9# ---------------
10# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
11#
12# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
13# created by `make install' are always world readable, even if the
14# installer happens to have an overly restrictive umask (e.g. 077).
15# This was a mistake. There are at least two reasons why we must not
16# use `-m 0755':
17# - it causes special bits like SGID to be ignored,
18# - it may be too restrictive (some setups expect 775 directories).
19#
20# Do not use -m 0755 and let people choose whatever they expect by
21# setting umask.
22#
23# We cannot accept any implementation of `mkdir' that recognizes `-p'.
24# Some implementations (such as Solaris 8's) are not thread-safe: if a
25# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
26# concurrently, both version can detect that a/ is missing, but only
27# one can create it and the other will error out. Consequently we
28# restrict ourselves to GNU make (using the --version option ensures
29# this.)
30AC_DEFUN([AM_PROG_MKDIR_P],
31[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
32 # We used to keeping the `.' as first argument, in order to
33 # allow $(mkdir_p) to be used without argument. As in
34 # $(mkdir_p) $(somedir)
35 # where $(somedir) is conditionally defined. However this is wrong
36 # for two reasons:
37 # 1. if the package is installed by a user who cannot write `.'
38 # make install will fail,
39 # 2. the above comment should most certainly read
40 # $(mkdir_p) $(DESTDIR)$(somedir)
41 # so it does not work when $(somedir) is undefined and
42 # $(DESTDIR) is not.
43 # To support the latter case, we have to write
44 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
45 # so the `.' trick is pointless.
46 MKDIR_P='mkdir -p --'
47else
48 # On NextStep and OpenStep, the `mkdir' command does not
49 # recognize any option. It will interpret all options as
50 # directories to create, and then abort because `.' already
51 # exists.
52 for d in ./-p ./--version;
53 do
54 test -d $d && rmdir $d
55 done
56 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
57 if test -f "$ac_aux_dir/mkinstalldirs"; then
58 MKDIR_P='$(mkinstalldirs)'
59 else
60 MKDIR_P='$(install_sh) -d'
61 fi
62fi
63mkdir_p=$MKDIR_P
64AC_SUBST([mkdir_p])])