diff --git a/src/Makefile.in b/src/Makefile.in
index 6d2a1bc6f02353b3679859b7c0cae172c6dac082..a29919dd8ef79d0da18800e49203c94c8b5f00fa 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.in,v 1.182 2000/03/26 15:12:38 grubba Exp $
+# $Id: Makefile.in,v 1.183 2000/03/26 15:14:17 grubba Exp $
 #
 
 # This line is needed on some machines.
@@ -389,8 +389,8 @@ lib: $(LIBDIR_SRC)/master.pike.in Makefile
 	done
 	@if [ -d share/. ]; then : ; else \
 	  echo "Creating symlink ./share"; \
-	  if [ "x`ls share 2>&1 || :`" = "x" ]; then :; else \
-	    if [ "x`ls share.old 2>&1 || :`" = "x" ]; then :; else \
+	  if [ "x`ls -d share 2>/dev/null || :`" = "x" ]; then :; else \
+	    if [ "x`ls -d share.old 2>/dev/null || :`" = "x" ]; then :; else \
 	      echo "Deleting share.old"; \
 	      $(RM) share.old; \
 	    fi; \