diff options
author | Bruno Haible <bruno@clisp.org> | 2005-12-29 18:52:23 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:12:58 +0200 |
commit | 001131b621166d8d0aaf2b44b29210b961b4886a (patch) | |
tree | 14c6d8a7cdd49a0d8d2124d39a65af3d943c087f /build-aux | |
parent | aafced099cf620efce964b2f015ff7b9c3b188f2 (diff) | |
download | external_gettext-001131b621166d8d0aaf2b44b29210b961b4886a.zip external_gettext-001131b621166d8d0aaf2b44b29210b961b4886a.tar.gz external_gettext-001131b621166d8d0aaf2b44b29210b961b4886a.tar.bz2 |
Avoid a failure due to impossible hardlinking.
Diffstat (limited to 'build-aux')
-rwxr-xr-x | build-aux/install-reloc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/build-aux/install-reloc b/build-aux/install-reloc index 55ec38c..4dc5ffe 100755 --- a/build-aux/install-reloc +++ b/build-aux/install-reloc @@ -122,7 +122,9 @@ installdir=`echo "$destprog" | sed -e 's,/[^/]*$,,'` func_verbose $compile_command -I"$builddir" -I"$srcdir" -I"$config_h_dir" -DHAVE_CONFIG_H -DNO_XMALLOC -D"INSTALLPREFIX=\"$prefix\"" -D"INSTALLDIR=\"$installdir\"" -D"LIBPATHVAR=\"$library_path_var\"" -D"LIBDIRS=$libdirs" -D"EXEEXT=\"$exeext\"" "$srcdir"/relocwrapper.c "$srcdir"/progname.c "$srcdir"/progreloc.c "$srcdir"/xreadlink.c "$srcdir"/readlink.c "$srcdir"/canonicalize.c "$srcdir"/allocsa.c "$srcdir"/relocatable.c "$srcdir"/setenv.c "$srcdir"/strerror.c -o "$destprog.wrapper$exeext" || exit $? # Rename $destprog.wrapper -> $destprog -> $destprog.bin. -ln -f "$destprog$exeext" "$destprog.bin$exeext" || exit 1 +ln -f "$destprog$exeext" "$destprog.bin$exeext" \ + || { rm -f "$destprog.bin$exeext" && cp -p "$destprog$exeext" "$destprog.bin$exeext"; } \ + || exit 1 mv "$destprog.wrapper$exeext" "$destprog$exeext" || exit 1 exit 0 |