summaryrefslogtreecommitdiff
path: root/m4/mkdirp.m4
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@gnu.org>2004-01-04 00:02:28 +0000
committerAlexandre Duret-Lutz <adl@gnu.org>2004-01-04 00:02:28 +0000
commit410a8422274b4b31b9261b4d10a5afe20eb1547e (patch)
tree8a2a0793df9212a95ab23531dbd15ff4a4ac4286 /m4/mkdirp.m4
parent9f4cb8933c5e8f2ccaed32b94c81f3343b41637c (diff)
downloadautomake-410a8422274b4b31b9261b4d10a5afe20eb1547e.tar.gz
* m4/mkdirp.m4: Do not use `-m 0755'. This overrides special bits
and break setups where 775 directories are expected. Just obey umask as we did in the past. Report from Harlan Stenn.
Diffstat (limited to 'm4/mkdirp.m4')
-rw-r--r--m4/mkdirp.m422
1 files changed, 16 insertions, 6 deletions
diff --git a/m4/mkdirp.m4 b/m4/mkdirp.m4
index 034fc9146..e2c39d0ce 100644
--- a/m4/mkdirp.m4
+++ b/m4/mkdirp.m4
@@ -2,7 +2,7 @@
# ---------------
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,23 +19,33 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake. There are at least two reasons why we must not
+# use `-m 0755':
+# - it causes special bits like SGID to be ignored,
+# - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -m 0755 -p -- . 2>/dev/null; then
- mkdir_p='mkdir -m 0755 -p --'
+[if mkdir -p -- . 2>/dev/null; then
+ mkdir_p='mkdir -p --'
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
- for d in ./-m ./0755 ./-p ./--;
+ for d in ./-p ./--;
do
test -d $d && rmdir $d
done
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs) -m 0755'
+ mkdir_p='$(mkinstalldirs)'
else
- mkdir_p='$(install_sh) -m 0755 -d'
+ mkdir_p='$(install_sh) -d'
fi
fi
AC_SUBST([mkdir_p])])