summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorkonablend <[email protected]>2009-03-10 01:26:46 +0000
committerkonablend <[email protected]>2009-03-10 01:26:46 +0000
commit9524d15d80e03017ea0dcafd158562a304ee357a (patch)
tree9ee8cc3553fc1856eba171d16e6bd9d39d79ba46 /make
parent82a445c939dd4d63ee957190dce2de8d594a7782 (diff)
BuildSystem: effects Darwin platforms only
- fixed Darwin ppc hosted build reversion introduced in r2242. - fixed Darwin + Xcode in all scenerios to honor --debug option *** if building from Xcode there is no need to rebuild but you will have to close project and reload; xcodeproj has been updated. *** if building from terminal there *should* be no need to rebuild; the first 'make' after an update is expected to trigger a reconfigure and libhb will rebuild. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2248 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'make')
-rw-r--r--make/configure.py10
-rwxr-xr-xmake/test/build.matrix.darwin8
-rwxr-xr-xmake/xcodemake78
3 files changed, 57 insertions, 39 deletions
diff --git a/make/configure.py b/make/configure.py
index 3a462a322..7a91fdc23 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -441,6 +441,16 @@ class ArchAction( Action ):
self.mode['x86_64'] = 'x86_64-apple-darwin%s' % (host.release)
self.mode['ppc'] = 'powerpc-apple-darwin%s' % (host.release)
self.mode['ppc64'] = 'powerpc64-apple-darwin%s' % (host.release)
+
+ ## special cases in that powerpc does not match gcc -arch value
+ ## which we like to use; so it has to be removed.
+ ## note: we don't know if apple will release Ssnow Leopad/ppc64 yet; just a guess.
+ if 'powerpc' in self.mode:
+ del self.mode['powerpc']
+ self.mode.mode = 'ppc'
+ elif 'powerpc64' in self.mode:
+ del self.mode['powerpc64']
+ self.mode.mode = 'ppc64'
elif host.match( '*-*-linux*' ):
pass
else:
diff --git a/make/test/build.matrix.darwin b/make/test/build.matrix.darwin
index 1969cd604..4ed0e6f07 100755
--- a/make/test/build.matrix.darwin
+++ b/make/test/build.matrix.darwin
@@ -32,9 +32,10 @@ launch_xcode() {
eval $2="'--launch --launch-jobs=0 --launch-quiet'"
}
+for debug in none max; do
for arch in i386 ppc ppc64 x86_64; do
for method in launch_make launch_xcode term_make term_xcode; do
- dir=$buildprefix.$arch.$method
+ dir=$buildprefix.$arch.$debug.$method
if [ -d $dir ]; then
echo "skipping $dir"
continue
@@ -42,7 +43,7 @@ for arch in i386 ppc ppc64 x86_64; do
$method mode args
- cmd="./configure --arch=$arch --build=$dir $args"
+ cmd="./configure --arch=$arch --debug=$debug --build=$dir $args"
echo $cmd | awk '{ \
trail = ""; \
for( i = 4; i <= NF; i++ ) \
@@ -51,7 +52,8 @@ for arch in i386 ppc ppc64 x86_64; do
$cmd
if [ "$mode" = "make" ]; then
- (set -x; cd $dir && make -j8 >& log.txt)
+ (set -x; cd $dir && make -j8 >& log/build.txt)
fi
done
done
+done
diff --git a/make/xcodemake b/make/xcodemake
index 2c6c1a80b..aca4c41cd 100755
--- a/make/xcodemake
+++ b/make/xcodemake
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
set -e
@@ -12,52 +12,51 @@ set -e
MAKEFLAGS=
MFLAGS=
-## re/configure if not configured by Xcode or if missing top-makefile
-if [ $EXTERNAL_METHOD != 'xcode' -o ! -f $EXTERNAL_BUILD/GNUmakefile ]; then
- ## compute --arch value based on Xcode configuration naming convention
- case "$CONFIGURATION" in
- *.i386)
- arch="--arch=i386"
- ;;
- *.x86_64)
- arch="--arch=x86_64"
- ;;
- *.ppc)
- arch="--arch=ppc"
- ;;
- *.ppc64)
- arch="--arch=ppc64"
- ;;
- *)
- arch=
- ;;
- esac
+## sanity check - the build system only supports 1 arch at a time
+archcount=`echo $ARCHS | awk '{ print NF }'`
+if [ "$archcount" -ne 1 ]; then
+ echo "*********************************************************************"
+ echo "***"
+ echo "*** ERROR: invalid number of architectures: $ARCHS"
+ echo "*** This build system builds one (1) archtecture at a time."
+ echo "***"
+ echo "*********************************************************************"
+ exit 1
+fi
+
+## compute if re/configure necessary
+if [ $EXTERNAL_METHOD != 'xcode' ]; then
+ reconfigure="terminal -> Xcode"
+elif [ ! -f $EXTERNAL_BUILD/GNUmakefile ]; then
+ reconfigure="no configuration present"
+elif [ $EXTERNAL_SRC/make/configure.py -nt $EXTERNAL_BUILD/GNUmakefile ]; then
+ reconfigure="configure script was updated"
+else
+ reconfigure=
+fi
+
+## perform re/configure
+if [ -n "$reconfigure" ]; then
+ echo "reconfiguring ($reconfigure)"
case "$CONFIGURATION" in
debug*)
- debug="--debug=max"
+ debug="--debug=max --optimize=none"
;;
- *)
+ standard*|*)
debug=
;;
esac
## invoke configure with (hidden) option which indicates conf performed by xcode
- $EXTERNAL_SRC/configure --force --build=$EXTERNAL_BUILD $arch $debug \
- --conf-method=xcode PATH=$PATH $EXTERNAL_CONFARGS
-fi
-
-## safeguard against passing blank value which would result in unlimited jobs
-if [ -z "$EXTERNAL_JOBS" ]; then
- jobs=
-else
- jobs=--jobs=$EXTERNAL_JOBS
+ (set -x; $EXTERNAL_SRC/configure --force --build=$EXTERNAL_BUILD \
+ $EXTERNAL_CONFARGS \
+ --arch=$ARCHS $debug --conf-method=xcode PATH=$PATH )
fi
+## compute goals; these correlate with TARGET_NAME and ACTION from Xcode
spec="$TARGET_NAME:$ACTION"
echo "env specification: $spec"
-
-## compute goals
case "$spec" in
contrib:clean)
goals=contrib.xclean
@@ -87,6 +86,13 @@ case "$spec" in
;;
esac
-## handoff
+## safeguard against passing blank value which would result in unlimited jobs
+if [ -z "$EXTERNAL_JOBS" ]; then
+ jobs=
+else
+ jobs=--jobs=$EXTERNAL_JOBS
+fi
+
+## pull the trigger
set -x
-make -C $EXTERNAL_BUILD BUILD.method=xcode $jobs $goals $EXTERNAL_VARS
+exec make -C $EXTERNAL_BUILD BUILD.method=xcode $jobs $goals $EXTERNAL_VARS