libetpan - fdik
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.

72 lines
1.7 KiB

11 years ago
10 years ago
11 years ago
10 years ago
10 years ago
  1. #!/bin/sh
  2. if test ! -d libetpan.xcodeproj ; then
  3. exit 1;
  4. fi
  5. logfile="`pwd`/update.log"
  6. cd ..
  7. if test "x$1" = xprepare ; then
  8. echo preparing
  9. ./autogen.sh > "$logfile" 2>&1
  10. tar czf build-mac/autogen-result.tar.gz `find . -name '*.in'` configure install-sh config.sub missing config.guess
  11. exit 0
  12. elif test "x$1" = xprepare-clean ; then
  13. if test -f Makefile ; then
  14. make maintainer-clean >/dev/null
  15. cd build-mac
  16. rm -rf libsasl-ios
  17. rm -rf dependencies/build
  18. fi
  19. exit 0
  20. fi
  21. if test "x$SRCROOT" = x ; then
  22. echo Should be run from Xcode
  23. exit 1
  24. fi
  25. if test "x$ACTION" = x ; then
  26. ACTION=build
  27. fi
  28. if test "x$ACTION" = xbuild ; then
  29. md5 build-mac/autogen-result.tar.gz > build-mac/autogen-result.md5.new
  30. if ! cmp -s build-mac/autogen-result.md5 build-mac/autogen-result.md5.new ; then
  31. rm -f Makefile
  32. fi
  33. rm -f build-mac/autogen-result.md5.new
  34. if test ! -f Makefile ; then
  35. echo configuring
  36. tar xzf build-mac/autogen-result.tar.gz
  37. export SDKROOT=
  38. export IPHONEOS_DEPLOYMENT_TARGET=
  39. ./configure --enable-debug > "$logfile" 2>&1
  40. if [[ "$?" != "0" ]]; then
  41. echo "configure failed"
  42. exit 1
  43. fi
  44. make stamp-prepare-target >> "$logfile" 2>&1
  45. make libetpan-config.h >> "$logfile" 2>&1
  46. md5 build-mac/autogen-result.tar.gz > build-mac/autogen-result.md5
  47. fi
  48. if test "x$PLATFORM_NAME" = xiphoneos -o "x$PLATFORM_NAME" = xiphonesimulator ; then
  49. if test ! -d build-mac/libsasl-ios ; then
  50. # build dependencies for iOS
  51. cd build-mac
  52. sh ./prepare-ios.sh
  53. fi
  54. fi
  55. elif test "x$ACTION" = xclean ; then
  56. if test -f Makefile ; then
  57. make distclean >/dev/null
  58. cd build-mac
  59. rm -f autogen-result.md5
  60. rm -rf libsasl-ios
  61. rm -rf dependencies/build
  62. fi
  63. fi