From d84e2832f7534558f66ea117073c8ee5320fcbd1 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 3 May 2007 12:33:20 +0000 Subject: [PATCH] Second aproach at solving the 'install -d' issue. I added a public domain script that supposedly solves the issue on every box. I also looke at 'install-sh', but found a bazillion of versions, doing so much more than we actually need. But I am open to sugestions, and happy to reverse my changes if something better comes along. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5799 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- configure.in | 8 -------- makeinclude.in | 2 +- mkinstalldirs | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 9 deletions(-) create mode 100755 mkinstalldirs diff --git a/configure.in b/configure.in index df0755cc6..26aa58b3a 100644 --- a/configure.in +++ b/configure.in @@ -278,14 +278,6 @@ if test "$INSTALL" = "$ac_install_sh"; then # Use full path to install-sh script... INSTALL="`pwd`/install-sh -c" fi -AC_PATH_PROG(MKDIRR,mkdir) -dnl recursive mkdir -if test "x$MKDIRR" = "x:"; then - # Use install instead - MKDIRR="$INSTALL -d" -else - MKDIRR="$MKDIRR -p" -fi AC_PATH_PROG(NROFF,nroff) if test "x$NROFF" = "x:"; then # Try groff instead of nroff... diff --git a/makeinclude.in b/makeinclude.in index 029d97eeb..f2d2e9a8f 100644 --- a/makeinclude.in +++ b/makeinclude.in @@ -40,7 +40,7 @@ VPATH = @srcdir@ # programs we use... HTMLDOC = @HTMLDOC@ INSTALL = @INSTALL@ -MKDIRR = @MKDIRR@ +MKDIRR = ../mkinstalldirs LN = ln -s NROFF = @NROFF@ RM = rm -f diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 000000000..0fdf6bf16 --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,48 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $ + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + lasterr="" + + chmod 755 "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here +