Skip to content

Commit

Permalink
Merge pull request #27 from Tightdb/ks-makefile-upgrade
Browse files Browse the repository at this point in the history
Makefile upgraded to latest version from core library
  • Loading branch information
kspangsege committed Feb 24, 2014
2 parents 2641aa0 + 9f37a7f commit 89b2622
Show file tree
Hide file tree
Showing 8 changed files with 975 additions and 690 deletions.
26 changes: 13 additions & 13 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ case "$MODE" in
else
tightdb_echo "Could not find home of TightDB core library built for iPhone"
fi
touch "$CONFIG_MK" || { echo "Can't overwrite $CONFIG_MK." ; exit 1 ; }

touch "$CONFIG_MK" || { echo "Can't overwrite $CONFIG_MK."; exit 1; }

cat >"$CONFIG_MK" <<EOF
INSTALL_PREFIX = $install_prefix
Expand Down Expand Up @@ -424,36 +424,36 @@ EOF

"test")
require_config || exit 1
$MAKE test-norun || exit 1
$MAKE check-norun || exit 1
TEMP_DIR="$(mktemp -d /tmp/tightdb.objc.test.XXXX)" || exit 1
mkdir -p "$TEMP_DIR/unit-tests.octest/Contents/MacOS" || exit 1
cp "src/tightdb/objc/test/unit-tests" "$TEMP_DIR/unit-tests.octest/Contents/MacOS/" || exit 1
XCODE_HOME="$(xcode-select --print-path)" || exit 1
OBJC_DISABLE_GC=YES "$XCODE_HOME/Tools/otest" "$TEMP_DIR/unit-tests.octest" || exit 1
DYLD_LIBRARY_PATH="$TIGHTDB_OBJC_HOME/src/tightdb/objc" OBJC_DISABLE_GC=YES "$XCODE_HOME/Tools/otest" "$TEMP_DIR/unit-tests.octest" || exit 1
echo "Test passed"
exit 0
;;

"test-debug")
require_config || exit 1
$MAKE test-debug-norun || exit 1
$MAKE check-debug-norun || exit 1
TEMP_DIR="$(mktemp -d /tmp/tightdb.objc.test-debug.XXXX)" || exit 1
mkdir -p "$TEMP_DIR/unit-tests-dbg.octest/Contents/MacOS" || exit 1
cp "src/tightdb/objc/test/unit-tests-dbg" "$TEMP_DIR/unit-tests-dbg.octest/Contents/MacOS/" || exit 1
XCODE_HOME="$(xcode-select --print-path)" || exit 1
OBJC_DISABLE_GC=YES "$XCODE_HOME/Tools/otest" "$TEMP_DIR/unit-tests-dbg.octest" || exit 1
DYLD_LIBRARY_PATH="$TIGHTDB_OBJC_HOME/src/tightdb/objc" OBJC_DISABLE_GC=YES "$XCODE_HOME/Tools/otest" "$TEMP_DIR/unit-tests-dbg.octest" || exit 1
echo "Test passed"
exit 0
;;

"test-gdb")
require_config || exit 1
$MAKE test-debug-norun || exit 1
$MAKE check-debug-norun || exit 1
TEMP_DIR="$(mktemp -d /tmp/tightdb.objc.test-gdb.XXXX)" || exit 1
mkdir -p "$TEMP_DIR/unit-tests-dbg.octest/Contents/MacOS" || exit 1
cp "src/tightdb/objc/test/unit-tests-dbg" "$TEMP_DIR/unit-tests-dbg.octest/Contents/MacOS/" || exit 1
XCODE_HOME="$(xcode-select --print-path)" || exit 1
OBJC_DISABLE_GC=YES gdb --args "$XCODE_HOME/Tools/otest" "$TEMP_DIR/unit-tests-dbg.octest"
DYLD_LIBRARY_PATH="$TIGHTDB_OBJC_HOME/src/tightdb/objc" OBJC_DISABLE_GC=YES gdb --args "$XCODE_HOME/Tools/otest" "$TEMP_DIR/unit-tests-dbg.octest"
;;

"test-examples")
Expand Down Expand Up @@ -492,14 +492,14 @@ EOF

"install-prod")
require_config || exit 1
$MAKE install-only DESTDIR="$DESTDIR" INSTALL_FILTER=shared-libs || exit 1
$MAKE install-only DESTDIR="$DESTDIR" INSTALL_FILTER="shared-libs,progs" || exit 1
tightdb_echo "Done installing"
exit 0
;;

"install-devel")
require_config || exit 1
$MAKE install-only DESTDIR="$DESTDIR" INSTALL_FILTER=static-libs,progs,headers || exit 1
$MAKE install-only DESTDIR="$DESTDIR" INSTALL_FILTER="static-libs,dev-progs,headers" || exit 1
tigtdb_echo "Done installing"
exit 0
;;
Expand All @@ -513,14 +513,14 @@ EOF

"uninstall-prod")
require_config || exit 1
$MAKE uninstall INSTALL_FILTER=shared-libs || exit 1
$MAKE uninstall INSTALL_FILTER="shared-libs,progs" || exit 1
echo "Done uninstalling"
exit 0
;;

"uninstall-devel")
require_config || exit 1
$MAKE uninstall INSTALL_FILTER=static-libs,progs,extra || exit 1
$MAKE uninstall INSTALL_FILTER="static-libs,dev-progs,headers" || exit 1
echo "Done uninstalling"
exit 0
;;
Expand All @@ -532,7 +532,7 @@ EOF
export TIGHTDB_OBJC_INCLUDEDIR="$install_includedir"
export TIGHTDB_OBJC_LIBDIR="$install_libdir"
$MAKE -C "test-installed" clean || exit 1
$MAKE -C "test-installed" test || exit 1
$MAKE -C "test-installed" check || exit 1
echo "Test passed"
exit 0
;;
Expand Down
5 changes: 2 additions & 3 deletions examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
TEST_PROGRAMS = tutorial
check_PROGRAMS = tutorial

tutorial_SOURCES = \
tutorial.m
tutorial_SOURCES = tutorial.m

tutorial_CFLAGS = -Wno-comment -fobjc-arc -fobjc-abi-version=2
tutorial_LDFLAGS = -fobjc-link-runtime
Expand Down
Loading

0 comments on commit 89b2622

Please sign in to comment.