Build with WAF outside of source tree.

Update headers and search paths with new build logic.
This commit is contained in:
Romain Muller
2011-05-18 14:06:55 +02:00
parent 2a2761d354
commit 6d8982ab4b
7 changed files with 32 additions and 21 deletions
+18 -9
View File
@@ -9,20 +9,29 @@
# based on: http://log.yeahrightkeller.com/post/270155578/run-script-while-cleaning-in-xcode
buildAction () {
echo "Building libgit2..."
echo "Building libgit2..."
if [[ -d .git ]]
then
if [ "$(which git)" == "" ]; then
echo "git not found"
exit -1
fi
if [ "$(which git)" == "" ]; then
echo "git not found"
exit -1
fi
git submodule init
git submodule sync
git submodule update
cd libgit2
rm -f libgit2.a
make CFLAGS="-arch i386 -arch ppc"
ranlib libgit2.a
./waf --out=$TARGET_TEMP_DIR --prefix=$TARGET_BUILD_DIR configure
if [ $? != 0 ]; then
echo "error: failed to waf configure"
exit -1
fi
./waf build-static
if [ $? != 0 ]; then
echo "error: failed to waf build-static"
exit -1
fi
ranlib $TARGET_TEMP_DIR/static/libgit2.a
cp $TARGET_TEMP_DIR/static/libgit2.a $TARGET_BUILD_DIR
else
echo "error: Not a git repository."
echo "error: clone GitX first so that the libgit2 submodule can be updated"
@@ -33,7 +42,7 @@ buildAction () {
cleanAction () {
echo "Cleaning libgit2..."
cd libgit2
make clean
./waf clean
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -