Pádraig Brady wrote:
> On 27/05/15 13:45, KO Myung-Hun wrote:
>> 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 303df53..ce145cb 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$$
>
> You can just create the symlink to / and avoid the separate symlink$$.file
>
Fixed.
>> +
>> # 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
>
> ! test "$have_symlink_support"
>
Hmmm... not working...
--
KO Myung-Hun
Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM
Korean OS/2 User Community : http://www.ecomstation.co.kr
>From a7bb9807de734d7f29161fec0e804dc14ee7082d Mon Sep 17 00:00:00 2001
From: KO Myung-Hun <[email protected]>
Date: Wed, 1 May 2013 13:39:22 +0900
Subject: [PATCH] gnulib-tool: fall back into copy if symbolic link is not
supported
And warn about it.
* gnulib-tool (have_symlink_support): New.
(symbolic, lsymbolic): Clear on systems not supporting symbolic link.
---
gnulib-tool | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/gnulib-tool b/gnulib-tool
index 303df53..e7e2005 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -898,6 +898,14 @@ if test "X$1" = "X--no-reexec"; then
shift
fi
+# Check if symbolic link is supported
+have_symlink_support=false
+rm -f symlink$$
+if ln -s / symlink$$ 2>/dev/null; then
+ have_symlink_support=true
+fi
+rm -f symlink$$
+
# Unset CDPATH. Otherwise, output from 'cd dir' can surprise callers.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
@@ -1355,6 +1363,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.9.5