diff options
author | Paul Webster | 2013-02-14 17:36:43 +0000 |
---|---|---|
committer | Thomas Watson | 2013-02-15 15:50:06 +0000 |
commit | b22f25b711d260fe88c83d320dde89a9f56db7d6 (patch) | |
tree | a890c0b561c899cd47e5e78c433aed5e3d4c8be7 /features/org.eclipse.equinox.executable.feature/library/carbon/build.sh | |
parent | cb70c695f5c85be396bcb024db894795f8ec3262 (diff) | |
download | rt.equinox.framework-b22f25b711d260fe88c83d320dde89a9f56db7d6.tar.gz rt.equinox.framework-b22f25b711d260fe88c83d320dde89a9f56db7d6.tar.xz rt.equinox.framework-b22f25b711d260fe88c83d320dde89a9f56db7d6.zip |
Bug 394216 - o.e.equinox.executables IUs must be in build repo
Generate the correct feature and a secondary IU that doesn't
include all executables.
Diffstat (limited to 'features/org.eclipse.equinox.executable.feature/library/carbon/build.sh')
-rw-r--r-- | features/org.eclipse.equinox.executable.feature/library/carbon/build.sh | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/carbon/build.sh b/features/org.eclipse.equinox.executable.feature/library/carbon/build.sh new file mode 100644 index 000000000..ac923d2ff --- /dev/null +++ b/features/org.eclipse.equinox.executable.feature/library/carbon/build.sh @@ -0,0 +1,100 @@ +#!/bin/sh +#******************************************************************************* +# Copyright (c) 2000, 2009 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# IBM Corporation - initial API and implementation +# Kevin Cornell (Rational Software Corporation) +#******************************************************************************* +# +# Usage: sh build.sh [<optional switches>] [clean] +# +# where the optional switches are: +# -output <PROGRAM_OUTPUT> - executable filename ("eclipse") +# -os <DEFAULT_OS> - default Eclipse "-os" value +# -arch <DEFAULT_OS_ARCH> - default Eclipse "-arch" value +# -ws <DEFAULT_WS> - default Eclipse "-ws" value +# +# +# This script can also be invoked with the "clean" argument. + +cd `dirname $0` + +# Define default values for environment variables used in the makefiles. +programOutput="eclipse" +defaultOS="macosx" +defaultOSArch="x86" +defaultWS="carbon" +makefile="make_carbon.mak" +if [ "$OS" = "" ]; then + OS=`uname -s` +fi + +# Parse the command line arguments and override the default values. +extraArgs="" +while [ "$1" != "" ]; do + if [ "$1" = "-os" ] && [ "$2" != "" ]; then + defaultOS="$2" + shift + elif [ "$1" = "-arch" ] && [ "$2" != "" ]; then + defaultOSArch="$2" + shift + elif [ "$1" = "-ws" ] && [ "$2" != "" ]; then + defaultWS="$2" + shift + elif [ "$1" = "-output" ] && [ "$2" != "" ]; then + programOutput="$2" + shift + else + extraArgs="$extraArgs $1" + fi + shift +done + +# Set up environment variables needed by the makefiles. +PROGRAM_OUTPUT="$programOutput" +DEFAULT_OS="$defaultOS" +DEFAULT_OS_ARCH="$defaultOSArch" +DEFAULT_WS="$defaultWS" +EXEC_DIR=../../../../../rt.equinox.binaries/org.eclipse.equinox.executable +PPC_OUTPUT_DIR="$EXEC_DIR/bin/$defaultWS/$defaultOS/ppc/Eclipse.app/Contents/MacOS" +X86_OUTPUT_DIR="$EXEC_DIR/bin/$defaultWS/$defaultOS/x86/Eclipse.app/Contents/MacOS" +X86_64_OUTPUT_DIR="$EXEC_DIR/bin/$defaultWS/$defaultOS/x86_64/Eclipse.app/Contents/MacOS" + +if [ "$DEFAULT_WS" == "cocoa" ]; then + makefile="make_cocoa.mak" + export MACOSX_DEPLOYMENT_TARGET=10.5 +else + export MACOSX_DEPLOYMENT_TARGET=10.3 +fi + +if [ "$DEFAULT_OS_ARCH" == "x86_64" ]; then + echo "build x86_64" + ARCHS="-arch x86_64" + PROGRAM_OUTPUT_DIR=$X86_64_OUTPUT_DIR + DEFAULT_OS_ARCH="x86_64" +else + echo "build x86 and ppc" + ARCHS="-arch i386 -arch ppc" + PROGRAM_OUTPUT_DIR=$X86_OUTPUT_DIR +fi + +export PPC_OUTPUT_DIR X86_OUTPUT_DIR X86_64_OUTPUT_DIR PROGRAM_OUTPUT DEFAULT_OS DEFAULT_OS_ARCH DEFAULT_WS ARCHS PROGRAM_OUTPUT_DIR + +# If the OS is supported (a makefile exists) +if [ "$makefile" != "" ]; then + if [ "$extraArgs" != "" ]; then + make -f $makefile $extraArgs + else + echo "Building $OS launcher. Defaults: -os $DEFAULT_OS -arch $DEFAULT_OS_ARCH -ws $DEFAULT_WS" + make -f $makefile clean + make -f $makefile all + make -f $makefile install + fi +else + echo "Unknown OS ($OS) -- build aborted" +fi |