From 8cc1d5193337bef03f9525f2c017f6e70c4e64b9 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 22 Mar 2011 20:09:55 -0700 Subject: [PATCH 1/1] 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. --- ChangeLog | 6 ++ Makefile.in | 5 +- admin/notes/copyright | 4 -- configure.in | 2 +- doc/emacs/Makefile.in | 2 +- leim/ChangeLog | 4 ++ leim/Makefile.in | 2 +- lib-src/ChangeLog | 5 ++ lib-src/Makefile.in | 4 +- make-dist | 2 +- mkinstalldirs | 162 ------------------------------------------ 11 files changed, 23 insertions(+), 175 deletions(-) delete mode 100755 mkinstalldirs diff --git a/ChangeLog b/ChangeLog index f833e736e0..bab46c08c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-03-23 Glenn Morris + + * Makefile.in (mkdir): Use `install-sh -d' instead of mkinstalldirs. + (sync-from-gnulib): Don't sync mkinstalldirs. + * make-dist: Don't distribute mkinstalldirs. + 2011-03-23 Paul Eggert Fix more problems found by GCC 4.5.2's static checks. diff --git a/Makefile.in b/Makefile.in index 4dd8cff1bb..c94d7a5445 100644 --- a/Makefile.in +++ b/Makefile.in @@ -347,7 +347,6 @@ sync-from-gnulib: $(gnulib_srcdir) $(gnulib_srcdir)/build-aux/config.sub \ $(gnulib_srcdir)/build-aux/config.guess \ $(gnulib_srcdir)/build-aux/install-sh \ - $(gnulib_srcdir)/build-aux/mkinstalldirs \ $(gnulib_srcdir)/build-aux/move-if-change \ $(srcdir) cd $(srcdir) && autoreconf -I m4 @@ -678,7 +677,7 @@ install-strip: ### 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 mkinstalldirs +### /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. ### We set the umask so that any created directories are world-readable. ### FIXME it would be good to warn about non-standard permissions of @@ -692,7 +691,7 @@ mkdir: FRC done ; \ icondirs=`echo "$${icondirs}" | sed 's,$(srcdir)/etc/images/icons,$(DESTDIR)${icondir},g'` ; \ umask 022 ; \ - $(srcdir)/mkinstalldirs $(DESTDIR)${datadir} ${COPYDESTS} \ + $(srcdir)/install-sh -d $(DESTDIR)${datadir} ${COPYDESTS} \ $(DESTDIR)${infodir} $(DESTDIR)${man1dir} \ $(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \ $(DESTDIR)${datadir}/emacs/site-lisp \ diff --git a/admin/notes/copyright b/admin/notes/copyright index 54d97adaf1..45a8858f81 100644 --- a/admin/notes/copyright +++ b/admin/notes/copyright @@ -143,10 +143,6 @@ lib/Makefile.in install-sh - this file is copyright MIT, which is OK. Leave the copyright alone. -mkinstalldirs -src/m/news-r6.h - public domain, leave alone. - etc/refcards/*.tex also update the \def\year macro for the latest year. diff --git a/configure.in b/configure.in index faf14fc6bb..f450b89082 100644 --- a/configure.in +++ b/configure.in @@ -1359,7 +1359,7 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' ## In parallel builds, another make might create depdir between ## the first test and mkdir, so stick another test on the end. - ## Or use mkinstalldirs? mkdir -p is not portable. + ## Or use install-sh -d? mkdir -p is not portable. MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' deps_frag=autodeps.mk fi diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in index ae142dba6e..aca17ce817 100644 --- a/doc/emacs/Makefile.in +++ b/doc/emacs/Makefile.in @@ -111,7 +111,7 @@ EMACSSOURCES= \ ## This seems pointless. The info/ directory exists in both the ## repository and the release tarfiles. We do not use any -## equivalent of mkdir -p/mkinstalldirs, so this is not a general +## 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} diff --git a/leim/ChangeLog b/leim/ChangeLog index 7334fa991c..08da90c2aa 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1,3 +1,7 @@ +2011-03-23 Glenn Morris + + * Makefile.in (install): Use `install-sh -d' rather than mkinstalldirs. + 2011-02-28 Juanma Barranquero * quail/ethiopic.el ("ethiopic"): Fix tpo in docstring. diff --git a/leim/Makefile.in b/leim/Makefile.in index 8c2baadf15..531f0481f7 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 install: all if [ ! -d ${INSTALLDIR} ] ; then \ - umask 022; ${srcdir}/../mkinstalldirs ${INSTALLDIR}; \ + umask 022; ${srcdir}/../install-sh -d ${INSTALLDIR}; \ else true; fi if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \ rm -f ${INSTALLDIR}/leim-list.el; \ diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 3df2f6881d..0e46a83aaf 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-23 Glenn Morris + + * Makefile.in ($(DESTDIR)${archlibdir}): + Use `install-sh -d' rather than mkinstalldirs. + 2011-03-23 Paul Eggert * ebrowse.c: Use size_t, not int, for sizes. diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index f671b0844c..36366a4d2e 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in @@ -235,13 +235,13 @@ maybe-blessmail: $(BLESSMAIL_TARGET) $(DESTDIR)${archlibdir}: all @echo @echo "Installing utilities run internally by Emacs." - umask 022; $(top_srcdir)/mkinstalldirs $(DESTDIR)${archlibdir} + umask 022; $(top_srcdir)/install-sh -d $(DESTDIR)${archlibdir} if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \ for file in ${UTILITIES}; do \ $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file $(DESTDIR)${archlibdir}/$$file ; \ done ; \ fi - umask 022; $(top_srcdir)/mkinstalldirs $(DESTDIR)${gamedir}; \ + umask 022; $(top_srcdir)/install-sh -d $(DESTDIR)${gamedir}; \ touch $(DESTDIR)${gamedir}/snake-scores; \ touch $(DESTDIR)${gamedir}/tetris-scores -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 ee0efb04c3..1a92d48a6b 100755 --- a/make-dist +++ b/make-dist @@ -286,7 +286,7 @@ echo "Making links to top-level files" ln INSTALL README BUGS move-if-change ${tempdir} ln ChangeLog Makefile.in configure configure.in ${tempdir} ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} -ln mkinstalldirs config.sub config.guess install-sh ${tempdir} +ln config.sub config.guess install-sh ${tempdir} ln aclocal.m4 ${tempdir} ln compile depcomp missing ${tempdir} ln arg-nonnull.h c++defs.h warn-on-use.h ${tempdir} diff --git a/mkinstalldirs b/mkinstalldirs deleted file mode 100755 index 4191a45dbd..0000000000 --- a/mkinstalldirs +++ /dev/null @@ -1,162 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy - -scriptversion=2009-04-28.21; # UTC - -# Original author: Noah Friedman -# Created: 1993-05-16 -# Public domain. -# -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -nl=' -' -IFS=" "" $nl" -errstatus=0 -dirmode= - -usage="\ -Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... - -Create each directory DIR (with mode MODE, if specified), including all -leading file name components. - -Report bugs to ." - -# process command line arguments -while test $# -gt 0 ; do - case $1 in - -h | --help | --h*) # -h for help - echo "$usage" - exit $? - ;; - -m) # -m PERM arg - shift - test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } - dirmode=$1 - shift - ;; - --version) - echo "$0 $scriptversion" - exit $? - ;; - --) # stop option processing - shift - break - ;; - -*) # unknown option - echo "$usage" 1>&2 - exit 1 - ;; - *) # first non-opt arg - break - ;; - esac -done - -for file -do - if test -d "$file"; then - shift - else - break - fi -done - -case $# in - 0) exit 0 ;; -esac - -# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and -# mkdir -p a/c at the same time, both will detect that a is missing, -# one will create a, then the other will try to create a and die with -# a "File exists" error. This is a problem when calling mkinstalldirs -# from a parallel make. We use --version in the probe to restrict -# ourselves to GNU mkdir, which is thread-safe. -case $dirmode in - '') - if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - echo "mkdir -p -- $*" - exec 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. - test -d ./-p && rmdir ./-p - test -d ./--version && rmdir ./--version - fi - ;; - *) - if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && - test ! -d ./--version; then - echo "mkdir -m $dirmode -p -- $*" - exec mkdir -m "$dirmode" -p -- "$@" - else - # Clean up after NextStep and OpenStep mkdir. - for d in ./-m ./-p ./--version "./$dirmode"; - do - test -d $d && rmdir $d - done - fi - ;; -esac - -for file -do - case $file in - /*) pathcomp=/ ;; - *) pathcomp= ;; - esac - oIFS=$IFS - IFS=/ - set fnord $file - shift - IFS=$oIFS - - for d - do - test "x$d" = x && continue - - pathcomp=$pathcomp$d - case $pathcomp in - -*) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" - lasterr= - chmod "$dirmode" "$pathcomp" || lasterr=$? - - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi - - pathcomp=$pathcomp/ - done -done - -exit $errstatus - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: -- 2.20.1