aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2011-03-22 20:09:55 -0700
committerGlenn Morris2011-03-22 20:09:55 -0700
commit8cc1d5193337bef03f9525f2c017f6e70c4e64b9 (patch)
tree1ada81caa2a4d322a9ffdf3007ffbb4d0c080935
parent8ae17ff2bf7443379745356de33826b306dfefdf (diff)
downloademacs-8cc1d5193337bef03f9525f2c017f6e70c4e64b9.tar.gz
emacs-8cc1d5193337bef03f9525f2c017f6e70c4e64b9.zip
Replace mkinstalldirs with `install-sh -d', as automake recommends.
* Makefile.in (mkdir): Use `install-sh -d' instead of mkinstalldirs. (sync-from-gnulib): Don't sync mkinstalldirs. * make-dist: Don't distribute mkinstalldirs. * leim/Makefile.in (install): Use `install-sh -d' rather than mkinstalldirs. * lib-src/Makefile.in ($(DESTDIR)${archlibdir}): Use `install-sh -d' rather than mkinstalldirs. * configure.in, doc/emacs/Makefile.in: Update comments. * admin/notes/copyright: Remove mkinstalldirs.
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.in5
-rw-r--r--admin/notes/copyright4
-rw-r--r--configure.in2
-rw-r--r--doc/emacs/Makefile.in2
-rw-r--r--leim/ChangeLog4
-rw-r--r--leim/Makefile.in2
-rw-r--r--lib-src/ChangeLog5
-rw-r--r--lib-src/Makefile.in4
-rwxr-xr-xmake-dist2
-rwxr-xr-xmkinstalldirs162
11 files changed, 23 insertions, 175 deletions
diff --git a/ChangeLog b/ChangeLog
index f833e736e02..bab46c08c99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12011-03-23 Glenn Morris <rgm@gnu.org>
2
3 * Makefile.in (mkdir): Use `install-sh -d' instead of mkinstalldirs.
4 (sync-from-gnulib): Don't sync mkinstalldirs.
5 * make-dist: Don't distribute mkinstalldirs.
6
12011-03-23 Paul Eggert <eggert@cs.ucla.edu> 72011-03-23 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 Fix more problems found by GCC 4.5.2's static checks. 9 Fix more problems found by GCC 4.5.2's static checks.
diff --git a/Makefile.in b/Makefile.in
index 4dd8cff1bbc..c94d7a5445a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -347,7 +347,6 @@ sync-from-gnulib: $(gnulib_srcdir)
347 $(gnulib_srcdir)/build-aux/config.sub \ 347 $(gnulib_srcdir)/build-aux/config.sub \
348 $(gnulib_srcdir)/build-aux/config.guess \ 348 $(gnulib_srcdir)/build-aux/config.guess \
349 $(gnulib_srcdir)/build-aux/install-sh \ 349 $(gnulib_srcdir)/build-aux/install-sh \
350 $(gnulib_srcdir)/build-aux/mkinstalldirs \
351 $(gnulib_srcdir)/build-aux/move-if-change \ 350 $(gnulib_srcdir)/build-aux/move-if-change \
352 $(srcdir) 351 $(srcdir)
353 cd $(srcdir) && autoreconf -I m4 352 cd $(srcdir) && autoreconf -I m4
@@ -678,7 +677,7 @@ install-strip:
678 677
679### Build all the directories we're going to install Emacs in. Since 678### Build all the directories we're going to install Emacs in. Since
680### we may be creating several layers of directories (for example, 679### we may be creating several layers of directories (for example,
681### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use mkinstalldirs 680### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use install-sh -d
682### instead of mkdir. Not all systems' mkdir programs have the `-p' flag. 681### instead of mkdir. Not all systems' mkdir programs have the `-p' flag.
683### We set the umask so that any created directories are world-readable. 682### We set the umask so that any created directories are world-readable.
684### FIXME it would be good to warn about non-standard permissions of 683### FIXME it would be good to warn about non-standard permissions of
@@ -692,7 +691,7 @@ mkdir: FRC
692 done ; \ 691 done ; \
693 icondirs=`echo "$${icondirs}" | sed 's,$(srcdir)/etc/images/icons,$(DESTDIR)${icondir},g'` ; \ 692 icondirs=`echo "$${icondirs}" | sed 's,$(srcdir)/etc/images/icons,$(DESTDIR)${icondir},g'` ; \
694 umask 022 ; \ 693 umask 022 ; \
695 $(srcdir)/mkinstalldirs $(DESTDIR)${datadir} ${COPYDESTS} \ 694 $(srcdir)/install-sh -d $(DESTDIR)${datadir} ${COPYDESTS} \
696 $(DESTDIR)${infodir} $(DESTDIR)${man1dir} \ 695 $(DESTDIR)${infodir} $(DESTDIR)${man1dir} \
697 $(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \ 696 $(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \
698 $(DESTDIR)${datadir}/emacs/site-lisp \ 697 $(DESTDIR)${datadir}/emacs/site-lisp \
diff --git a/admin/notes/copyright b/admin/notes/copyright
index 54d97adaf1c..45a8858f815 100644
--- a/admin/notes/copyright
+++ b/admin/notes/copyright
@@ -143,10 +143,6 @@ lib/Makefile.in
143install-sh 143install-sh
144 - this file is copyright MIT, which is OK. Leave the copyright alone. 144 - this file is copyright MIT, which is OK. Leave the copyright alone.
145 145
146mkinstalldirs
147src/m/news-r6.h
148 public domain, leave alone.
149
150etc/refcards/*.tex 146etc/refcards/*.tex
151 also update the \def\year macro for the latest year. 147 also update the \def\year macro for the latest year.
152 148
diff --git a/configure.in b/configure.in
index faf14fc6bb3..f450b890823 100644
--- a/configure.in
+++ b/configure.in
@@ -1359,7 +1359,7 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
1359 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' 1359 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d'
1360 ## In parallel builds, another make might create depdir between 1360 ## In parallel builds, another make might create depdir between
1361 ## the first test and mkdir, so stick another test on the end. 1361 ## the first test and mkdir, so stick another test on the end.
1362 ## Or use mkinstalldirs? mkdir -p is not portable. 1362 ## Or use install-sh -d? mkdir -p is not portable.
1363 MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' 1363 MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}'
1364 deps_frag=autodeps.mk 1364 deps_frag=autodeps.mk
1365 fi 1365 fi
diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in
index ae142dba6e6..aca17ce817d 100644
--- a/doc/emacs/Makefile.in
+++ b/doc/emacs/Makefile.in
@@ -111,7 +111,7 @@ EMACSSOURCES= \
111 111
112## This seems pointless. The info/ directory exists in both the 112## This seems pointless. The info/ directory exists in both the
113## repository and the release tarfiles. We do not use any 113## repository and the release tarfiles. We do not use any
114## equivalent of mkdir -p/mkinstalldirs, so this is not a general 114## equivalent of mkdir -p/install-sh -d, so this is not a general
115## solution anyway. The second test -d is for parallel builds. 115## solution anyway. The second test -d is for parallel builds.
116mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir} 116mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
117 117
diff --git a/leim/ChangeLog b/leim/ChangeLog
index 7334fa991c9..08da90c2aa8 100644
--- a/leim/ChangeLog
+++ b/leim/ChangeLog
@@ -1,3 +1,7 @@
12011-03-23 Glenn Morris <rgm@gnu.org>
2
3 * Makefile.in (install): Use `install-sh -d' rather than mkinstalldirs.
4
12011-02-28 Juanma Barranquero <lekktu@gmail.com> 52011-02-28 Juanma Barranquero <lekktu@gmail.com>
2 6
3 * quail/ethiopic.el ("ethiopic"): Fix tpo in docstring. 7 * quail/ethiopic.el ("ethiopic"): Fix tpo in docstring.
diff --git a/leim/Makefile.in b/leim/Makefile.in
index 8c2baadf15f..531f0481f7a 100644
--- a/leim/Makefile.in
+++ b/leim/Makefile.in
@@ -220,7 +220,7 @@ MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done
220 220
221install: all 221install: all
222 if [ ! -d ${INSTALLDIR} ] ; then \ 222 if [ ! -d ${INSTALLDIR} ] ; then \
223 umask 022; ${srcdir}/../mkinstalldirs ${INSTALLDIR}; \ 223 umask 022; ${srcdir}/../install-sh -d ${INSTALLDIR}; \
224 else true; fi 224 else true; fi
225 if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \ 225 if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
226 rm -f ${INSTALLDIR}/leim-list.el; \ 226 rm -f ${INSTALLDIR}/leim-list.el; \
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 3df2f6881db..0e46a83aafa 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,8 @@
12011-03-23 Glenn Morris <rgm@gnu.org>
2
3 * Makefile.in ($(DESTDIR)${archlibdir}):
4 Use `install-sh -d' rather than mkinstalldirs.
5
12011-03-23 Paul Eggert <eggert@cs.ucla.edu> 62011-03-23 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 * ebrowse.c: Use size_t, not int, for sizes. 8 * ebrowse.c: Use size_t, not int, for sizes.
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index f671b0844ce..36366a4d2e7 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -235,13 +235,13 @@ maybe-blessmail: $(BLESSMAIL_TARGET)
235$(DESTDIR)${archlibdir}: all 235$(DESTDIR)${archlibdir}: all
236 @echo 236 @echo
237 @echo "Installing utilities run internally by Emacs." 237 @echo "Installing utilities run internally by Emacs."
238 umask 022; $(top_srcdir)/mkinstalldirs $(DESTDIR)${archlibdir} 238 umask 022; $(top_srcdir)/install-sh -d $(DESTDIR)${archlibdir}
239 if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \ 239 if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \
240 for file in ${UTILITIES}; do \ 240 for file in ${UTILITIES}; do \
241 $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file $(DESTDIR)${archlibdir}/$$file ; \ 241 $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file $(DESTDIR)${archlibdir}/$$file ; \
242 done ; \ 242 done ; \
243 fi 243 fi
244 umask 022; $(top_srcdir)/mkinstalldirs $(DESTDIR)${gamedir}; \ 244 umask 022; $(top_srcdir)/install-sh -d $(DESTDIR)${gamedir}; \
245 touch $(DESTDIR)${gamedir}/snake-scores; \ 245 touch $(DESTDIR)${gamedir}/snake-scores; \
246 touch $(DESTDIR)${gamedir}/tetris-scores 246 touch $(DESTDIR)${gamedir}/tetris-scores
247 -if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score && chmod u+s $(DESTDIR)${archlibdir}/update-game-score; then \ 247 -if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score && chmod u+s $(DESTDIR)${archlibdir}/update-game-score; then \
diff --git a/make-dist b/make-dist
index ee0efb04c3a..1a92d48a6ba 100755
--- a/make-dist
+++ b/make-dist
@@ -286,7 +286,7 @@ echo "Making links to top-level files"
286ln INSTALL README BUGS move-if-change ${tempdir} 286ln INSTALL README BUGS move-if-change ${tempdir}
287ln ChangeLog Makefile.in configure configure.in ${tempdir} 287ln ChangeLog Makefile.in configure configure.in ${tempdir}
288ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} 288ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir}
289ln mkinstalldirs config.sub config.guess install-sh ${tempdir} 289ln config.sub config.guess install-sh ${tempdir}
290ln aclocal.m4 ${tempdir} 290ln aclocal.m4 ${tempdir}
291ln compile depcomp missing ${tempdir} 291ln compile depcomp missing ${tempdir}
292ln arg-nonnull.h c++defs.h warn-on-use.h ${tempdir} 292ln arg-nonnull.h c++defs.h warn-on-use.h ${tempdir}
diff --git a/mkinstalldirs b/mkinstalldirs
deleted file mode 100755
index 4191a45dbd7..00000000000
--- a/mkinstalldirs
+++ /dev/null
@@ -1,162 +0,0 @@
1#! /bin/sh
2# mkinstalldirs --- make directory hierarchy
3
4scriptversion=2009-04-28.21; # UTC
5
6# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
7# Created: 1993-05-16
8# Public domain.
9#
10# This file is maintained in Automake, please report
11# bugs to <bug-automake@gnu.org> or send patches to
12# <automake-patches@gnu.org>.
13
14nl='
15'
16IFS=" "" $nl"
17errstatus=0
18dirmode=
19
20usage="\
21Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
22
23Create each directory DIR (with mode MODE, if specified), including all
24leading file name components.
25
26Report bugs to <bug-automake@gnu.org>."
27
28# process command line arguments
29while test $# -gt 0 ; do
30 case $1 in
31 -h | --help | --h*) # -h for help
32 echo "$usage"
33 exit $?
34 ;;
35 -m) # -m PERM arg
36 shift
37 test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
38 dirmode=$1
39 shift
40 ;;
41 --version)
42 echo "$0 $scriptversion"
43 exit $?
44 ;;
45 --) # stop option processing
46 shift
47 break
48 ;;
49 -*) # unknown option
50 echo "$usage" 1>&2
51 exit 1
52 ;;
53 *) # first non-opt arg
54 break
55 ;;
56 esac
57done
58
59for file
60do
61 if test -d "$file"; then
62 shift
63 else
64 break
65 fi
66done
67
68case $# in
69 0) exit 0 ;;
70esac
71
72# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
73# mkdir -p a/c at the same time, both will detect that a is missing,
74# one will create a, then the other will try to create a and die with
75# a "File exists" error. This is a problem when calling mkinstalldirs
76# from a parallel make. We use --version in the probe to restrict
77# ourselves to GNU mkdir, which is thread-safe.
78case $dirmode in
79 '')
80 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
81 echo "mkdir -p -- $*"
82 exec mkdir -p -- "$@"
83 else
84 # On NextStep and OpenStep, the `mkdir' command does not
85 # recognize any option. It will interpret all options as
86 # directories to create, and then abort because `.' already
87 # exists.
88 test -d ./-p && rmdir ./-p
89 test -d ./--version && rmdir ./--version
90 fi
91 ;;
92 *)
93 if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
94 test ! -d ./--version; then
95 echo "mkdir -m $dirmode -p -- $*"
96 exec mkdir -m "$dirmode" -p -- "$@"
97 else
98 # Clean up after NextStep and OpenStep mkdir.
99 for d in ./-m ./-p ./--version "./$dirmode";
100 do
101 test -d $d && rmdir $d
102 done
103 fi
104 ;;
105esac
106
107for file
108do
109 case $file in
110 /*) pathcomp=/ ;;
111 *) pathcomp= ;;
112 esac
113 oIFS=$IFS
114 IFS=/
115 set fnord $file
116 shift
117 IFS=$oIFS
118
119 for d
120 do
121 test "x$d" = x && continue
122
123 pathcomp=$pathcomp$d
124 case $pathcomp in
125 -*) pathcomp=./$pathcomp ;;
126 esac
127
128 if test ! -d "$pathcomp"; then
129 echo "mkdir $pathcomp"
130
131 mkdir "$pathcomp" || lasterr=$?
132
133 if test ! -d "$pathcomp"; then
134 errstatus=$lasterr
135 else
136 if test ! -z "$dirmode"; then
137 echo "chmod $dirmode $pathcomp"
138 lasterr=
139 chmod "$dirmode" "$pathcomp" || lasterr=$?
140
141 if test ! -z "$lasterr"; then
142 errstatus=$lasterr
143 fi
144 fi
145 fi
146 fi
147
148 pathcomp=$pathcomp/
149 done
150done
151
152exit $errstatus
153
154# Local Variables:
155# mode: shell-script
156# sh-indentation: 2
157# eval: (add-hook 'write-file-hooks 'time-stamp)
158# time-stamp-start: "scriptversion="
159# time-stamp-format: "%:y-%02m-%02d.%02H"
160# time-stamp-time-zone: "UTC"
161# time-stamp-end: "; # UTC"
162# End: