[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/14] gnulib-tool: fall back into copy if symbolic link is not s
From: |
KO Myung-Hun |
Subject: |
[PATCH 10/14] gnulib-tool: fall back into copy if symbolic link is not supported |
Date: |
Tue, 9 Dec 2014 10:40:55 +0900 |
And warn about it.
* gnulib-tool (have_symlink_support): New.
(symbolic, lsymbolic): Clear on systems not supporting symbolic link.
---
gnulib-tool | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/gnulib-tool b/gnulib-tool
index 2641378..c5a4c87 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -898,6 +898,16 @@ if test "X$1" = "X--no-reexec"; then
shift
fi
+# Check if symbolic link is supported
+have_symlink_support=false
+rm -f symlink$$.file symlink$$
+if (echo >symlink$$.file) 2>/dev/null; then
+ if ln -s symlink$$.file symlink$$ 2>/dev/null; then
+ have_symlink_support=true
+ fi
+fi
+rm -f symlink$$.file symlink$$
+
# Unset CDPATH. Otherwise, output from 'cd dir' can surprise callers.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
@@ -1355,6 +1365,16 @@ fi
echo "gnulib-tool: option --conditional-dependencies is not supported with
--with-tests" 1>&2
func_exit 1
fi
+ # Warn if symbolic link is requested on a system not supporting it.
+ # And fall back into copy.
+ if { test -n "$symbolic" || test -n "$lsymbolic" ; } \
+ && ! $have_symlink_support ; then
+ echo "gnulib-tool: symbolic link is not supported on this system." 1>&2
+ echo "Copy will be performed instead." 1>&2
+
+ symbolic=
+ lsymbolic=
+ fi
# Determine the minimum supported autoconf version from the project's
# configure.ac.
--
1.8.5.2
- Re: [PATCH 03/14] relocatable: support UNIXROOT in relocate() on EMX, (continued)
[PATCH 04/14] binary-io: don't put fd in binary mode if it is a console on EMX, KO Myung-Hun, 2014/12/08
[PATCH 05/14] pipe-filter-aux: undefine HAVE_SELECT on KLIBC, KO Myung-Hun, 2014/12/08
[PATCH 06/14] w32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC, KO Myung-Hun, 2014/12/08
[PATCH 07/14] getdtablesize: do not use getrlimit() on OS/2 kLIBC, KO Myung-Hun, 2014/12/08
[PATCH 08/14] wcwidth: fix 'conflicting types' error for `__wcwidth' on OS/2 kLIBC, KO Myung-Hun, 2014/12/08
[PATCH 09/14] utimes: detect utimes() correctly on OS/2 kLIBC, KO Myung-Hun, 2014/12/08
[PATCH 10/14] gnulib-tool: fall back into copy if symbolic link is not supported,
KO Myung-Hun <=
[PATCH 11/14] pipe_filter_ii_execute: port to OS/2 kLIBC, KO Myung-Hun, 2014/12/08
[PATCH 12/14] save_cwd: save/restore all CWDs of each drive on EMX, KO Myung-Hun, 2014/12/08
[PATCH 13/14] dup, dup2, fcntl: support a directory fd on OS/2 kLIBC, KO Myung-Hun, 2014/12/08
[PATCH 14/14] opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC, KO Myung-Hun, 2014/12/08