if ``pwd`' contains the string `-p'. Create the wrapper in a
subdirectory so that `.' in $PATH does not lead to an endless
loop.
2006-05-10 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ * tests/mkinst3.test: Fix `mkdir' wrapper to not be confused
+ if ``pwd`' contains the string `-p'. Create the wrapper in a
+ subdirectory so that `.' in $PATH does not lead to an endless
+ loop.
+
* lib/depcomp (ia64hp): Rename dependency style to..
(hp2): ..this, as it works with aCC on HPPA, too; adjust
comment. Report by Olivier Fourdan (PR automake/481).
#! /bin/sh
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# Trick mkinstalldirs into thinking mkdir does not support -p.
-cat >mkdir <<'EOF'
+mkdir bin
+cat >bin/mkdir <<'EOF'
#!/bin/sh
-case "$*" in
- *-p*) exit 1;;
-esac
+for arg
+do
+ case $arg in
+ -p) exit 1;;
+ esac
+done
PATH=$AM_PATH
export PATH
exec mkdir "$@"
EOF
-chmod +x mkdir
+chmod +x bin/mkdir
AM_PATH=$PATH
export AM_PATH
-PATH=`pwd`:$PATH
+PATH=`pwd`/bin:$PATH
export PATH
# Test mkinstalldirs without mkdir -p.