[sword-svn] r2619 - trunk/bindings/objc/build_sword

mdbergmann at crosswire.org mdbergmann at crosswire.org
Tue Mar 22 14:03:13 MST 2011


Author: mdbergmann
Date: 2011-03-22 14:03:13 -0700 (Tue, 22 Mar 2011)
New Revision: 2619

Removed:
   trunk/bindings/objc/build_sword/Makefile
Modified:
   trunk/bindings/objc/build_sword/build_mac_sword.sh
   trunk/bindings/objc/build_sword/build_ub_mac_swordutils.sh
   trunk/bindings/objc/build_sword/readme.txt
Log:
removed dependency from build of sword utils as in MACSW-256. Further improved build scripts.

Deleted: trunk/bindings/objc/build_sword/Makefile
===================================================================
--- trunk/bindings/objc/build_sword/Makefile	2011-03-19 11:54:58 UTC (rev 2618)
+++ trunk/bindings/objc/build_sword/Makefile	2011-03-22 21:03:13 UTC (rev 2619)
@@ -1,25 +0,0 @@
-.PHONY: default release-ppc release-intel release-fat debug-ppc debug-intel debug-fat clean
-
-default: release-fat
-
-release-ppc:
-	./build_mac_sword.sh release ppc
-
-release-intel:
-	./build_mac_sword.sh release intel
-
-release-fat:
-	./build_mac_sword.sh release fat 
-
-debug-ppc:
-	./build_mac_sword.sh debug ppc
-
-debug-intel:
-	./build_mac_sword.sh debug intel
-
-debug-fat:
-	./build_mac_sword.sh debug fat 
-
-clean:
-	rm -rf build
-

Modified: trunk/bindings/objc/build_sword/build_mac_sword.sh
===================================================================
--- trunk/bindings/objc/build_sword/build_mac_sword.sh	2011-03-19 11:54:58 UTC (rev 2618)
+++ trunk/bindings/objc/build_sword/build_mac_sword.sh	2011-03-22 21:03:13 UTC (rev 2619)
@@ -6,46 +6,71 @@
 VERS=1.6.2
 BDIR=`pwd`
 
-DEBUG=0
-FAT=0
-PPC=0
-INTEL=0
-
 SWORDPATH="$BDIR/../../../"
 ICUPATH="$BDIR/../dependencies/icu"
 PPCCLUCENEPATH="$BDIR/../build_clucene/build/ppc_inst"
 INTELCLUCENEPATH="$BDIR/../build_clucene/build/intel_inst"
 INTEL64CLUCENEPATH="$BDIR/../build_clucene/build/intel64_inst"
 
-# check commandline
-for arg in "$@" 
+usage() {
+cat << EOF
+usage: $0 options
+
+OPTIONS:
+   -d      Buildtype debug version
+   -a      Architecture [intel|ppc|fat]
+   -b      Buildpath, default = "build"
+   -c      With clucene
+EOF
+}
+
+DEBUG=0
+FAT=0
+PPC=0
+INTEL=0
+USECLUCENE=0
+BUILDDIR=build
+
+while getopts “da:b:c?” OPTION
 do
-	if [ "$arg" = "debug" ]; then
-		DEBUG=1
-		echo "building debug version"
-	fi
-	if [ "$arg" = "fat" ]; then
-		FAT=1
-		PPC=1
-		INTEL=1
-		echo "building fat version"
-	fi
-	if [ "$arg" = "ppc" ]; then
-		PPC=1
-		echo "building ppc version"
-	else
-		PPC=0
-	fi
-	if [ "$arg" = "intel" ]; then
-		INTEL=1
-		echo "building intel version"
-	else
-		INTEL=0
-	fi
+     case $OPTION in
+         d)
+         DEBUG=1
+         echo "building debug version"
+         ;;
+         a)
+         if [ "$OPTARG" = "fat" ]; then
+           FAT=1
+           PPC=1
+           INTEL=1
+           echo "building fat version"
+         fi
+         if [ "$OPTARG" = "ppc" ]; then
+           PPC=1
+           echo "building ppc version"
+         fi
+         if [ "$OPTARG" = "intel" ]; then
+           INTEL=1
+           echo "building intel version"
+         fi
+         ;;
+         b)
+         BUILDDIR="$OPTARG"
+         echo "using builddir $BUILDDIR"
+         ;;
+         c)
+         USECLUCENE=1
+         echo "building with clucene"
+         ;;
+         ?)
+         usage
+         exit
+         ;;
+     esac
 done
 
 # using seperate build dirs and building in them doesn't work with sword
-BUILD=$BDIR/build
+BUILD=$BDIR/"$BUILDDIR"
 PPCPREFIX=$BUILD/ppc_inst
 INTELPREFIX=$BUILD/intel_inst
 INTEL64PREFIX=$BUILD/intel64_inst
@@ -96,14 +121,18 @@
 	fi
 	export CXXFLAGS="$CFLAGS"
 	export LDFLAGS="-isysroot $SDK -Wl,-syslibroot,$SDK"
-	./configure --prefix=$PPCPREFIX --with-clucene=$PPCCLUCENEPATH --with-zlib --with-conf --with-icu --with-curl --disable-tests --disable-shared --enable-utilities
+	if [ $USECLUCENE -eq 1 ]; then
+  	./configure --prefix=$PPCPREFIX --with-clucene=$PPCCLUCENEPATH --with-zlib --with-conf --with-icu --with-curl --disable-tests --disable-shared
+	else
+  	./configure --prefix=$PPCPREFIX --without-clucene --with-zlib --with-conf --with-icu --with-curl --disable-tests --disable-shared --enable-utilities
+  fi
 	make all install
 	make clean
 	cd $BDIR
 	# copy to result dir
 	PPC_LIB_EXPORT="$RESULTPREFIX/lib/lib$APP-ppc.a"
 	cp $PPCPREFIX/lib/lib$APP.a $PPC_LIB_EXPORT
-    echo "building PPC version of library...done"
+  echo "building PPC version of library...done"
 fi
 
 if [ $INTEL -eq 1 ] || [ $FAT -eq 1 ]; then
@@ -122,16 +151,20 @@
 	fi
 	export CXXFLAGS="$CFLAGS"
 	export LDFLAGS="-isysroot $SDK -Wl,-syslibroot,$SDK"
-	./configure --prefix=$INTELPREFIX --with-clucene=$INTELCLUCENEPATH --with-zlib --with-conf --with-icu --with-curl --enable-tests --disable-shared --enable-utilities
+	if [ $USECLUCENE -eq 1 ]; then
+  	./configure --prefix=$INTELPREFIX --with-clucene=$INTELCLUCENEPATH --with-zlib --with-conf --with-icu --with-curl --enable-tests --disable-shared
+  else
+  	./configure --prefix=$INTELPREFIX --without-clucene --with-zlib --with-conf --with-icu --with-curl --enable-tests --disable-shared --enable-utilities
+  fi
 	make all install
 	make clean
 	cd $BDIR
 	# copy to result dir
 	INTEL_LIB_EXPORT="$RESULTPREFIX/lib/lib$APP-intel.a"
 	cp $INTELPREFIX/lib/lib$APP.a $INTEL_LIB_EXPORT
-    echo "building INTEL version of library...done"
+  echo "building INTEL version of library...done"
 
-    echo "building INTEL64 version of library..."
+  echo "building INTEL64 version of library..."
 	cd $SWORDPATH
 	make clean
 	echo 'autogen.sh ...'
@@ -147,14 +180,18 @@
 	fi
 	export CXXFLAGS="$CFLAGS"
 	export LDFLAGS="-isysroot $SDK -Wl,-syslibroot,$SDK"
-	./configure --prefix=$INTEL64PREFIX --with-clucene=$INTEL64CLUCENEPATH --with-zlib --with-conf --with-icu --with-curl --enable-tests --disable-shared --enable-utilities
+	if [ $USECLUCENE -eq 1 ]; then
+  	./configure --prefix=$INTEL64PREFIX --with-clucene=$INTEL64CLUCENEPATH --with-zlib --with-conf --with-icu --with-curl --enable-tests --disable-shared
+  else
+  	./configure --prefix=$INTEL64PREFIX --without-clucene --with-zlib --with-conf --with-icu --with-curl --enable-tests --disable-shared --enable-utilities
+  fi
 	make all install
 	make clean
 	cd $BDIR
 	# copy to result dir
 	INTEL64_LIB_EXPORT="$RESULTPREFIX/lib/lib$APP-intel64.a"
 	cp $INTEL64PREFIX/lib/lib$APP.a $INTEL64_LIB_EXPORT
-    echo "building INTEL64 version of library...done"
+  echo "building INTEL64 version of library...done"
 fi
 
 # only for fat version

Modified: trunk/bindings/objc/build_sword/build_ub_mac_swordutils.sh
===================================================================
--- trunk/bindings/objc/build_sword/build_ub_mac_swordutils.sh	2011-03-19 11:54:58 UTC (rev 2618)
+++ trunk/bindings/objc/build_sword/build_ub_mac_swordutils.sh	2011-03-22 21:03:13 UTC (rev 2619)
@@ -4,10 +4,13 @@
 
 # dependencies for this script are:
 # that "build_mac_sword.sh" has been executed in "fat" mode and
-# successfully created a "build" folder with directories: "ppc_inst" and "intel_inst"
+# successfully created a "build_tools" folder with directories: "ppc_inst" and "intel_inst"
 
+# first build library
+./build_mac_sword.sh -a fat -b build_tools
+
 BDIR=.
-SWORDBUILD=$BDIR/build
+SWORDBUILD=$BDIR/build_tools
 PPCPREFIX=$SWORDBUILD/ppc_inst
 INTELPREFIX=$SWORDBUILD/intel_inst
 RESULTPREFIX=$SWORDBUILD/result_inst

Modified: trunk/bindings/objc/build_sword/readme.txt
===================================================================
--- trunk/bindings/objc/build_sword/readme.txt	2011-03-19 11:54:58 UTC (rev 2618)
+++ trunk/bindings/objc/build_sword/readme.txt	2011-03-22 21:03:13 UTC (rev 2619)
@@ -1,8 +1,9 @@
-Building sword library for MacSword:
+Building sword library for Eloquent:
 
 - make a symlink for libtoolize:
 ln -s /usr/bin/glibtoolize /usr/bin/libtoolize
-- call one of the Build*.sh scripts either for a point release or SVN trunk.
-parameters can be: "fat"|"intel"|"ppc", "debug"|"release"
-- call CreateUniversalBinarySWORDUtilities.sh
 
+- build the library as it is a dependency for the Xcode project:
+./build_mac_sword.sh -a fat -c
+(check -? for possible options).
+




More information about the sword-cvs mailing list