2004-07-25 Alexandre Duret-Lutz <adl@gnu.org>
+ * m4/mkdirp.m4 (AM_PROG_MKDIR_P): Remove `.' from the mkdir_p
+ definition, it causes `make install' to fails for user with no
+ right to write in the source-tree.
+ * automake.in (handle_configure): Do not use mkdir_p in the
+ definition for $(mkdir_p).
+ Report from Harlan Stenn.
+
* lib/am/texi-vers.am (%STAMPVTI%): Typo in comment.
2004-07-22 Alexandre Duret-Lutz <adl@gnu.org>
if @distclean_config;
# Distribute and define mkinstalldirs only if it is already present
- # in the package, for backward compatibility (some people my still
+ # in the package, for backward compatibility (some people may still
# use $(mkinstalldirs)).
my $mkidpath = "$config_aux_dir/mkinstalldirs";
if (-f $mkidpath)
}
else
{
- define_variable ('mkinstalldirs', '$(mkdir_p)', INTERNAL);
+ # Use $(install_sh), not $(mkdir_p) because the latter requires
+ # at least one argument, and $(mkinstalldirs) used to work
+ # even without arguments (e.g. $(mkinstalldirs) $(conditional_dir)).
+ define_variable ('mkinstalldirs', '$(install_sh) -d', INTERNAL);
}
reject_var ('CONFIG_HEADER',
fi
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # Keeping the `.' argument allows $(mkdir_p) to be used without
- # argument. Indeed, we sometimes output rules like
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined.
- # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
- # expensive solution, as it forces Make to start a sub-shell.)
- mkdir_p='mkdir -p -- .'
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
-@set UPDATED 22 July 2004
+@set UPDATED 25 July 2004
@set UPDATED-MONTH July 2004
@set EDITION 1.8e
@set VERSION 1.8e
-@set UPDATED 22 July 2004
+@set UPDATED 25 July 2004
@set UPDATED-MONTH July 2004
@set EDITION 1.8e
@set VERSION 1.8e
# this.)
AC_DEFUN([AM_PROG_MKDIR_P],
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # Keeping the `.' argument allows $(mkdir_p) to be used without
- # argument. Indeed, we sometimes output rules like
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined.
- # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
- # expensive solution, as it forces Make to start a sub-shell.)
- mkdir_p='mkdir -p -- .'
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as