A C standard library for sh3eb-elf.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
846B

  1. addto_CPPFLAGS() {
  2. local f
  3. for f; do
  4. case " $CPPFLAGS " in
  5. *\ $f\ *) ;;
  6. *) CPPFLAGS="$CPPFLAGS $f" ;;
  7. esac
  8. done
  9. }
  10. realdirpath() {
  11. [ -z "$1" ] && return 1
  12. (cd "$1" 2>/dev/null && pwd)
  13. if test $? -ne 0; then
  14. return 1
  15. else
  16. return 0
  17. fi
  18. }
  19. for d in . .. ../.. ../../..; do
  20. if test -e "$srcdir/$d/configure.cygwin"; then
  21. winsup_srcdir=$(realdirpath "$srcdir/$d")
  22. break
  23. fi
  24. done
  25. if test -z "$winsup_srcdir"; then
  26. echo "cannot find directory containing configure.cygwin" 1>&2
  27. exit 1
  28. fi
  29. case "$srcdir" in
  30. */newlib*) lookfor=newlib ;;
  31. */winsup*) lookfor=winsup ;;
  32. *) lookfor=. ;;
  33. esac
  34. for d in . .. ../.. ../../..; do
  35. if test -d "$d/$lookfor"; then
  36. target_builddir=$(realdirpath "$d")
  37. break
  38. fi
  39. done
  40. if test -z "$target_builddir"; then
  41. target_builddir=$(pwd)
  42. fi