From 001131b621166d8d0aaf2b44b29210b961b4886a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 29 Dec 2005 18:52:23 +0000 Subject: Avoid a failure due to impossible hardlinking. --- build-aux/install-reloc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'build-aux') 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 -- cgit v1.1