summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2007-05-03 12:33:20 +0000
committerMatthias Melcher <fltk@matthiasm.com>2007-05-03 12:33:20 +0000
commitd84e2832f7534558f66ea117073c8ee5320fcbd1 (patch)
tree85fe75f20f45241e81de950cd3c76c50ea11be9c
parent40be03495dd074c2ea6cc39ba6b7c6e39cf72815 (diff)
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
-rw-r--r--configure.in8
-rw-r--r--makeinclude.in2
-rwxr-xr-xmkinstalldirs48
3 files changed, 49 insertions, 9 deletions
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 <friedman@prep.ai.mit.edu>
+# 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
+