summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rwxr-xr-xautomake.in7
-rwxr-xr-xconfigure20
-rw-r--r--doc/stamp-vti2
-rw-r--r--doc/version.texi2
-rw-r--r--m4/mkdirp.m420
6 files changed, 42 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 41fedbdc0..479bb0adc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
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>
diff --git a/automake.in b/automake.in
index 3f3f15d93..93da5fb72 100755
--- a/automake.in
+++ b/automake.in
@@ -3882,7 +3882,7 @@ sub handle_configure ($$$@)
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)
@@ -3895,7 +3895,10 @@ sub handle_configure ($$$@)
}
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',
diff --git a/configure b/configure
index 667a6e137..62daf5db4 100755
--- a/configure
+++ b/configure
@@ -1688,13 +1688,21 @@ echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
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
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 1868b47c6..cbd3d3131 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 22 July 2004
+@set UPDATED 25 July 2004
@set UPDATED-MONTH July 2004
@set EDITION 1.8e
@set VERSION 1.8e
diff --git a/doc/version.texi b/doc/version.texi
index 1868b47c6..cbd3d3131 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
-@set UPDATED 22 July 2004
+@set UPDATED 25 July 2004
@set UPDATED-MONTH July 2004
@set EDITION 1.8e
@set VERSION 1.8e
diff --git a/m4/mkdirp.m4 b/m4/mkdirp.m4
index 361d20cfd..5541b03aa 100644
--- a/m4/mkdirp.m4
+++ b/m4/mkdirp.m4
@@ -39,13 +39,21 @@
# 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