mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Build with WAF outside of source tree.
Update headers and search paths with new build logic.
This commit is contained in:
+18
-9
@@ -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
|
||||
}
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
Reference in New Issue
Block a user