+2006-04-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ * lib/install.sh: Handle --, and diagnose unknown options.
+ * m4/mkdirp.m4 (AM_PROG_MKDIR_P): In the normal case, set
+ mkdir_p='mkdir -p', not to 'mkdir -p --', for consistency with
+ the other ways that mkdir_p might be set.
+
2006-04-21 Alexandre Duret-Lutz <adl@gnu.org>
* m4/amversion.in (_AM_AUTOCONF_VERSION): New macro.
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
-while test -n "$1"; do
+while test $# -ne 0; do
case $1 in
-c) shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;;
- *) # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- test -n "$dir_arg$dstarg" && break
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dstarg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dstarg"
- shift # fnord
- fi
- shift # arg
- dstarg=$arg
- done
+ --) shift
break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
esac
done
-if test -z "$1"; then
+if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+fi
+
+if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
## -*- Autoconf -*-
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# this.)
AC_DEFUN([AM_PROG_MKDIR_P],
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to define $(mkdir_p) as `mkdir -p -- .', in order to
+ # We used to define $(mkdir_p) as `mkdir -p .', in order to
# allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir)
# where $(somedir) is conditionally defined. However we don't do
# 3. $(mkdir_p) is named after `mkdir -p' and we don't expect this
# to accept no argument.
# 4. having something like `mkdir .' in the output is unsightly.
- mkdir_p='mkdir -p --'
+ mkdir_p='mkdir -p'
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as