     exit 0
 }
 
-# add_directory DIR
-# -----------------
-# Add DIR to the output path.
-add_directory ()
-{
-  local dir=$1
-  if test -d "$dir"; then
-    dir=$(winepath -w "$dir")
-    windirs="$windirs;$dir"
-  fi
-}
 
 # process_wrapper WRAPPER
 # -----------------------

# We used to check that we are not running Cygwin underneath.  Does
# not seem to make any sense here, and MN does not remember why he
# checked that.  So this check is removed.
case $host in
  (*pw32*|*mingw32*)
    export WINEPREFIX=$where/wine
    test -d "$WINEPREFIX" ||
      create_wine_directory
    verbose "WINEPREFIX='$WINEPREFIX'"
    echo "WINEPREFIX='$WINEPREFIX'"
    ;;
esac

exit 0
]

      ln -s $f "$WINEPREFIX"
    fi
  done

  # Convert the directories into a format that windows like.
  local windirs=
  local dir
  for dir in $dirs
  do
    test ! -d "$dir" ||
      windirs+=";$(winepath -w "$dir")"
  done

  # Add all the added path to the Path variable in user.reg config
  # file.  That idiotic file may have multiple "Path=".  Only one
  # will have ';'.
