libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with test -L on Solaris


From: Albert Chin-A-Young
Subject: Problems with test -L on Solaris
Date: Sun, 22 Apr 2001 01:06:39 -0500
User-agent: Mutt/1.1.12i

While running 'make check' on the 1.4 branch for Solaris, the *-unst
tests were failing. Does anyone know if 'test -L' is portable? Solaris
/bin/sh doesn't like it:
  $ uname -a
  SunOS gax 5.8 Generic_108528-02 sun4u sparc SUNW,Ultra-2
  $ /bin/sh
  $ /usr/bin/test -L /tmp/foo
  $ test -L /tmp/foo
  test: argument expected

Because of this, the following code snippet in ltmain.in will always
fail (and thus 'make uninstall' will always fail on Solaris):
  # Don't error if the file doesn't exist and rm -f was used.
  if test -L "$file" >/dev/null 2>&1 || test -f "$file"; then
    :
  elif test -d "$file"; then
    exit_status=1
    continue
  elif test "$rmforce" = yes; then
    continue
  fi

Note that Solaris /bin/sh has 'test -h' as an equivalent to test if a
file is a symbolic link (what 'test -L' does). Solaris /usr/bin/test
accepts -L correctly. So, /bin/sh internal test is different from
/usr/bin/test.

-- 
albert chin (address@hidden)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]