diff options
author | konablend <[email protected]> | 2009-03-04 00:54:53 +0000 |
---|---|---|
committer | konablend <[email protected]> | 2009-03-04 00:54:53 +0000 |
commit | 6d2d51974af122bdfe6eb82f355e270cd66c48af (patch) | |
tree | 5a82b3790f4dd0c3f71aa1643838e937edca597a /make/xcodemake | |
parent | c4d9c49de0f020f451325dbb39b97642eaf96032 (diff) |
BuildSystem: darwin
- made Xcode external targets consistent for each configuration.
- shunted terminal NAME=VALUE vars through xcodebuild.
- folded macosx/module.xcode shunt functions into single.
- added new report target to show a single var; eg: make report.var NAME=GCC.gcc .
BuildSystem: darwin ppc
- fixed configure on ppc host: correctly identify native architecture.
- fixed configure to be more resilient when svn probes fail.
- fixed configure to show error output for svn probes.
BuildSystme: xcode
- added external target 'external' to represent 'all things in external system'
which is slight more than what 'libhb' might represent.
- added doc section Building.osx: External Targets .
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2214 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'make/xcodemake')
-rwxr-xr-x | make/xcodemake | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/make/xcodemake b/make/xcodemake new file mode 100755 index 000000000..a75cd3ed6 --- /dev/null +++ b/make/xcodemake @@ -0,0 +1,85 @@ +#!/bin/sh +# + +set -e + +## This script is invoked by Xcode external targets. +## +## We must guarantee no jobserver is passed through since the file-descriptors +## have been clobbered by Xcode. If this is not done then make behaves as if +## it is allowed to run an infinite number of jobs. +## +MAKEFLAGS= +MFLAGS= + +cd $EXTERNAL_BUILD + +## 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) + args="--arch=i386" + ;; + *.x86_64) + args="--arch=x86_64" + ;; + *.ppc) + args="--arch=ppc" + ;; + *.ppc64) + args="--arch=ppc64" + ;; + *) + args= + ;; + esac + + ## invoke configure with (hidden) option which indicates conf performed by xcode + $EXTERNAL_PROJECT/configure PATH=$PATH --conf-method=xcode $args +fi + +## safeguard against passing blank value which would result in unlimited jobs +if [ -z "$EXTERNAL_JOBS" ]; then + jobs= +else + jobs=--jobs=$EXTERNAL_JOBS +fi + +spec="$TARGET_NAME:$ACTION" +echo "env specification: $spec" + +## compute goals +case "$spec" in + contrib:clean) + goals=contrib.xclean + ;; + contrib:*) + goals=contrib.install + ;; + external:clean) + goals=clean + ;; + external:*) + if [ -z "$EXTERNAL_GOALS" ]; then + goals=build + else + goals="$EXTERNAL_GOALS" + fi + vars="$EXTERNAL_VARS" + ;; + libhb:clean) + goals=libhb.clean + ;; + libhb:*) + goals=libhb.build + ;; + *) + echo "ERROR: invalid env specification: $spec" + exit 1 + ;; +esac + +## handoff +set -x +make -C $EXTERNAL_BUILD BUILD.method=xcode $jobs $goals $vars |