summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-05-11 20:57:48 -0400
committerGlenn Morris <rgm@gnu.org>2012-05-11 20:57:48 -0400
commit3fe7cdc86d67dd5dcf1ce9d779b20dfec9eafb8d (patch)
tree024689144c2da897a7a93b8485f76c60b97ba1a1
parent2171cea5fcc5537bf6179284bdce554d80982594 (diff)
Let configure test for a suitable mkdir -p
* configure.in (AC_PROG_MKDIR_P): Call it, to set MKDIR_P. (MKDEPDIR): Use $MKDIR_P. * Makefile.in (MKDIR_P): New, set by configure. (mkdir): Use $MKDIR_P. * doc/emacs/Makefile.in (MKDIR_P): New, set by configure. (mkinfodir): Use $MKDIR_P. * doc/lispintro/Makefile.in (MKDIR_P): New, set by configure. (mkinfodir): Use $MKDIR_P. * doc/lispref/Makefile.in (MKDIR_P): New, set by configure. (mkinfodir): Use $MKDIR_P. * doc/misc/Makefile.in (MKDIR_P): New, set by configure. (mkinfodir): Use $MKDIR_P. * src/Makefile.in (MKDIR_P): New, set by configure. * src/ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
-rw-r--r--ChangeLog7
-rw-r--r--Makefile.in10
-rw-r--r--configure.in7
-rw-r--r--doc/emacs/ChangeLog5
-rw-r--r--doc/emacs/Makefile.in8
-rw-r--r--doc/lispintro/ChangeLog5
-rw-r--r--doc/lispintro/Makefile.in4
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/Makefile.in4
-rw-r--r--doc/misc/ChangeLog7
-rw-r--r--doc/misc/Makefile.in4
-rw-r--r--src/ChangeLog5
-rw-r--r--src/Makefile.in3
-rw-r--r--src/ns.mk6
14 files changed, 58 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d8a3eadec..7599d2b38b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * configure.in (AC_PROG_MKDIR_P): Call it, to set MKDIR_P.
+ (MKDEPDIR): Use $MKDIR_P.
+ * Makefile.in (MKDIR_P): New, set by configure.
+ (mkdir): Use $MKDIR_P.
+
2012-05-11 Glenn Morris <rgm@gnu.org>
* Makefile.in (install-arch-indep): There are no more Makefile.c files.
diff --git a/Makefile.in b/Makefile.in
index 844d92d228..0a62875c97 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -229,7 +229,7 @@ gamedir=@gamedir@
# Note that if the system does not provide a suitable install,
# configure will use build-aux/install-sh. Annoyingly, it does
# not use an absolute path. So we must take care to always run
-# INSTALL-type commands from the top-level directory.
+# INSTALL-type commands from the directory containing the Makefile.
# This explains (I think) the cd thisdir seen in several install rules.
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -237,6 +237,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_INFO = @INSTALL_INFO@
# By default, we uphold the dignity of our programs.
INSTALL_STRIP =
+MKDIR_P = @MKDIR_P@
# We use gzip to compress installed .el files.
GZIP_PROG = @GZIP_PROG@
@@ -659,10 +660,7 @@ install-leim: leim/Makefile mkdir
install-strip:
$(MAKE) $(MFLAGS) INSTALL_STRIP=-s install
-### Build all the directories we're going to install Emacs in. Since
-### we may be creating several layers of directories (for example,
-### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use install-sh -d
-### instead of mkdir. Not all systems' mkdir programs have the `-p' flag.
+### Build all the directories we're going to install Emacs in.
### We set the umask so that any created directories are world-readable.
### FIXME it would be good to warn about non-standard permissions of
### pre-existing directories, but that does not seem easy.
@@ -675,7 +673,7 @@ mkdir: FRC
done ; \
icondirs=`echo "$${icondirs}" | sed 's,$(srcdir)/etc/images/icons,$(DESTDIR)${icondir},g'` ; \
umask 022 ; \
- $(srcdir)/build-aux/install-sh -d $(DESTDIR)${datadir} ${COPYDESTS} \
+ $(MKDIR_P) $(DESTDIR)${datadir} ${COPYDESTS} \
$(DESTDIR)${infodir} $(DESTDIR)${man1dir} \
$(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \
$(DESTDIR)${datadir}/emacs/site-lisp \
diff --git a/configure.in b/configure.in
index 1554d8e2ae..0ee180633e 100644
--- a/configure.in
+++ b/configure.in
@@ -808,6 +808,7 @@ fi
dnl checks for programs
AC_PROG_CPP
AC_PROG_INSTALL
+AC_PROG_MKDIR_P
if test "x$RANLIB" = x; then
AC_PROG_RANLIB
fi
@@ -1480,10 +1481,8 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
fi
if test $ac_enable_autodepend = yes; then
DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
- ## In parallel builds, another make might create depdir between
- ## the first test and mkdir, so stick another test on the end.
- ## Or use install-sh -d? mkdir -p is not portable.
- MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}'
+ ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
+ MKDEPDIR='${MKDIR_P} ${DEPDIR}'
deps_frag=autodeps.mk
fi
fi
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index b166262a7c..a9d45ef2a4 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (MKDIR_P): New, set by configure.
+ (mkinfodir): Use $MKDIR_P.
+
2012-05-10 Glenn Morris <rgm@gnu.org>
* mule.texi (Disabling Multibyte): Replace the obsolete "unibyte: t"
diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in
index 0e03efd987..7ffbf52e94 100644
--- a/doc/emacs/Makefile.in
+++ b/doc/emacs/Makefile.in
@@ -35,6 +35,8 @@ infodir = $(srcdir)/../../info
# Directory with the (customized) texinfo.tex file.
texinfodir = $(srcdir)/../misc
+MKDIR_P = @MKDIR_P@
+
INFO_EXT=@INFO_EXT@
# Options used only when making info output.
# --no-split is only needed because of MS-DOS.
@@ -118,10 +120,8 @@ EMACSSOURCES= \
$(EMACS_XTRA)
## This seems pointless. The info/ directory exists in both the
-## repository and the release tarfiles. We do not use any
-## equivalent of mkdir -p/install-sh -d, so this is not a general
-## solution anyway. The second test -d is for parallel builds.
-mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
+## repository and the release tarfiles.
+mkinfodir = @${MKDIR_P} ${infodir}
.PHONY: info dvi html pdf ps
diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog
index 1191b0de91..126c10c434 100644
--- a/doc/lispintro/ChangeLog
+++ b/doc/lispintro/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (MKDIR_P): New, set by configure.
+ (mkinfodir): Use $MKDIR_P.
+
2012-05-05 Glenn Morris <rgm@gnu.org>
* emacs-lisp-intro.texi (Making Errors): Don't mention Emacs 20.
diff --git a/doc/lispintro/Makefile.in b/doc/lispintro/Makefile.in
index 29f5344b8c..bf10e5c73b 100644
--- a/doc/lispintro/Makefile.in
+++ b/doc/lispintro/Makefile.in
@@ -26,6 +26,8 @@ infodir = $(srcdir)/../../info
# Directory with the (customized) texinfo.tex file.
texinfodir = $(srcdir)/../misc
+MKDIR_P = @MKDIR_P@
+
INFO_EXT=@INFO_EXT@
# Options used only when making info output.
INFO_OPTS=@INFO_OPTS@
@@ -39,7 +41,7 @@ DVIPS = dvips
ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \
MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
-mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
+mkinfodir = @${MKDIR_P} ${infodir}
.PHONY: info dvi html pdf ps
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index b56164669f..c3b50dbdcd 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (MKDIR_P): New, set by configure.
+ (mkinfodir): Use $MKDIR_P.
+
2012-05-10 Glenn Morris <rgm@gnu.org>
* loading.texi (Loading Non-ASCII): Replace the obsolete "unibyte: t"
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in
index f1e3fba369..dd820d8513 100644
--- a/doc/lispref/Makefile.in
+++ b/doc/lispref/Makefile.in
@@ -30,6 +30,8 @@ texinfodir = $(srcdir)/../misc
# Directory with emacsver.texi.
emacsdir = $(srcdir)/../emacs
+MKDIR_P = @MKDIR_P@
+
INFO_EXT=@INFO_EXT@
# Options used only when making info output.
INFO_OPTS=@INFO_OPTS@
@@ -99,7 +101,7 @@ srcs = \
$(srcdir)/gpl.texi \
$(srcdir)/doclicense.texi
-mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
+mkinfodir = @${MKDIR_P} ${infodir}
.PHONY: info dvi pdf ps
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 72e784f1f8..1765c22d79 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (MKDIR_P): New, set by configure.
+ (mkinfodir): Use $MKDIR_P.
+
2012-05-07 Glenn Morris <rgm@gnu.org>
* forms.texi (Long Example): Update for changed location of files.
@@ -8995,7 +9000,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1993-1999, 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 1993-1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in
index 83bc2d7bf3..30fdbccee7 100644
--- a/doc/misc/Makefile.in
+++ b/doc/misc/Makefile.in
@@ -38,6 +38,8 @@ infodir=../../info
## Currently only used by efaq and calc.
emacsdir = $(srcdir)/../emacs
+MKDIR_P = @MKDIR_P@
+
INFO_EXT=@INFO_EXT@
# Options used only when making info output.
INFO_OPTS=@INFO_OPTS@
@@ -211,7 +213,7 @@ TEXI2PDF = texi2pdf
ENVADD = TEXINPUTS="$(srcdir):$(emacsdir):$(TEXINPUTS)" \
MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
-mkinfodir = @cd ${srcdir}; test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
+mkinfodir = @${MKDIR_P} ${srcdir}/${infodir}
.PHONY: info dvi pdf echo-info
diff --git a/src/ChangeLog b/src/ChangeLog
index 805fa7ee09..3c3f04b923 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (MKDIR_P): New, set by configure.
+ * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
+
2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
Remove unused function hourglass_started.
diff --git a/src/Makefile.in b/src/Makefile.in
index 32276084b3..dd667ea60a 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -40,6 +40,7 @@ version = @version@
# Substitute an assignment for the MAKE variable, because
# BSD doesn't have it as a default.
@SET_MAKE@
+MKDIR_P = @MKDIR_P@
# Don't use LIBS. configure puts stuff in it that either shouldn't be
# linked with Emacs or is duplicated by the other stuff below.
# LIBS = @LIBS@
@@ -284,7 +285,7 @@ CANNOT_DUMP=@CANNOT_DUMP@
DEPDIR=deps
## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty.
DEPFLAGS=@DEPFLAGS@
-## test -d $(DEPDIR) || mkdir $(DEPDIR) (if AUTO_DEPEND); else ':'.
+## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'.
MKDEPDIR=@MKDEPDIR@
## DO NOT use -R. There is a special hack described in lastfile.c
diff --git a/src/ns.mk b/src/ns.mk
index d3b5afeb99..bdfee61bd0 100644
--- a/src/ns.mk
+++ b/src/ns.mk
@@ -1,6 +1,6 @@
### autodeps.mk --- src/Makefile fragment for GNU Emacs
-## Copyright (C) 2008-2012 Free Software Foundation, Inc.
+## Copyright (C) 2008-2012 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
@@ -27,11 +27,11 @@
${ns_appdir}: ${ns_appsrc}
rm -fr ${ns_appdir}
- mkdir -p ${ns_appdir}
+ ${MKDIR_P} ${ns_appdir}
( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; umask 022; tar xf - )
${ns_appbindir}Emacs: emacs${EXEEXT}
- mkdir -p ${ns_appbindir}
+ ${MKDIR_P} ${ns_appbindir}
cp -f emacs${EXEEXT} ${ns_appbindir}Emacs
ns-app: ${ns_appdir} ${ns_appbindir}Emacs