diff options
author | Alexandre Duret-Lutz <adl@gnu.org> | 2004-07-25 21:34:41 +0000 |
---|---|---|
committer | Alexandre Duret-Lutz <adl@gnu.org> | 2004-07-25 21:34:41 +0000 |
commit | 55846d15ea280e3cf850e1e9343bb16bca1df202 (patch) | |
tree | 23cbf4a8b23a7607180891d239fb67f6c06e6642 /m4/mkdirp.m4 | |
parent | cf286e8a25ce38652a307bcb58d990353b765ede (diff) | |
download | automake-55846d15ea280e3cf850e1e9343bb16bca1df202.tar.gz |
* 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.
Diffstat (limited to 'm4/mkdirp.m4')
-rw-r--r-- | m4/mkdirp.m4 | 20 |
1 files changed, 14 insertions, 6 deletions
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 |