forked from andreberg/gitx
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build settings to include x86_64 arch
Set the debug configuration to NATIVE_ARCH_ACTUAL because NATIVE_ARCH will always be i386 Move the "compile libgit2" script build phase to it's own target. By setting the script to run in it's own target we get the ability to clean it durning the clean phase (normal build phase scripts don't run during clean). This will be needed if someone has built GitX prior to this commit because the object files will be for the old architectures. Also give an error if there is no git repository. This is from several questions I've received after someone has downloaded the source from github instead of cloning the project. The problem is that there is no submodule setting to update.
- Loading branch information
1 parent
d81645e
commit de7d74c
Showing
2 changed files
with
116 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/sh | ||
|
||
# build_libgit2.sh | ||
# GitX | ||
# | ||
# Created by BrotherBard on 7/3/10. | ||
# Copyright 2010 BrotherBard. All rights reserved. | ||
# | ||
# based on: http://log.yeahrightkeller.com/post/270155578/run-script-while-cleaning-in-xcode | ||
|
||
buildAction () { | ||
echo "Building libgit2..." | ||
if [[ -d .git ]] | ||
then | ||
export PATH=$PATH:$HOME/bin:$HOME/local/bin:/sw/bin:/opt/local/bin:`"$TARGET_BUILD_DIR"/gitx --git-path` | ||
git submodule init | ||
git submodule update | ||
cd libgit2 | ||
rm -f libgit2.a | ||
make CFLAGS="-arch i386 -arch ppc -arch x86_64" | ||
ranlib libgit2.a | ||
else | ||
echo "error: Not a git repository." | ||
echo "error: clone GitX first so that the libgit2 submodule can be updated" | ||
exit 1 | ||
fi | ||
} | ||
|
||
cleanAction () { | ||
echo "Cleaning libgit2..." | ||
cd libgit2 | ||
make clean | ||
} | ||
|
||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
# MAIN | ||
|
||
#echo "Running with ACTION=${ACTION}" | ||
|
||
case $ACTION in | ||
# NOTE: it gets set to "" rather than "build" when doing a build. | ||
"") | ||
buildAction | ||
;; | ||
|
||
"clean") | ||
cleanAction | ||
;; | ||
esac | ||
|
||
exit 0 | ||
|