diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-12-26 00:34:13 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-12-26 00:35:06 -0800 |
commit | 17ea0df46f819a9b64c21151983a5c5b8561fefb (patch) | |
tree | 08470298b79cc6677dcdaf949e5e0e5801e9d721 /lib/m4sugar | |
parent | b854606885ca849e0b5a1488b6dc82105d3c138d (diff) | |
download | autoconf-17ea0df46f819a9b64c21151983a5c5b8561fefb.tar.gz |
AS_LN_S: fall back on 'cp -pR' (not 'cp -p') if 'ln -s' fails
This works better for symlinks to directories.
Problem reported by Eli Zaretskii via Werner Lemberg in
<http://lists.gnu.org/archive/html/bug-autoconf/2011-12/msg00006.html>.
* NEWS:
* doc/autoconf.texi (Particular Programs): Document this.
* lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Implement this.
Diffstat (limited to 'lib/m4sugar')
-rw-r--r-- | lib/m4sugar/m4sh.m4 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index 1ff17052..7195618a 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -1178,7 +1178,7 @@ _m4_popdef([AS_MESSAGE_LOG_FD], [AS_ERROR])])# _AS_LINENO_PREPARE # Don't use conftest.sym to avoid file name issues on DJGPP, where this # would yield conftest.sym.exe for DJGPP < 2.04. And don't use `conftest' # as base name to avoid prohibiting concurrency (e.g., concurrent -# config.statuses). On read-only media, assume 'cp -p' and hope we +# config.statuses). On read-only media, assume 'cp -pR' and hope we # are just running --help anyway. m4_defun([_AS_LN_S_PREPARE], [rm -f conf$$ conf$$.exe conf$$.file @@ -1194,16 +1194,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null |