Commit d4bc4680 authored by Nat Goodspeed's avatar Nat Goodspeed

DRTVWR-418: Update build-cmd.sh to new SLing conventions.

parent 15a20904
#!/bin/bash
#!/usr/bin/env bash
cd "$(dirname "$0")"
# turn on verbose debugging output for parabuild logs.
set -x
exec 4>&1; export BASH_XTRACEFD=4; set -x
# make errors fatal
set -e
# complain about unset env variables
set -u
if [ -z "$AUTOBUILD" ] ; then
fail
exit 1
fi
if [ "$OSTYPE" = "cygwin" ] ; then
......@@ -25,15 +25,14 @@ OGG_VERSION="$(sed -n 's/^ VERSION=\(.*\)$/\1/p' "$OGG_SOURCE_DIR/configure")"
VORBIS_SOURCE_DIR="libvorbis"
VORBIS_VERSION="$(sed -n "s/^PACKAGE_VERSION='\(.*\)'/\1/p" "$VORBIS_SOURCE_DIR/configure")"
# load autbuild provided shell functions and variables
eval "$("$autobuild" source_environment)"
# set LL_BUILD and friends
set_build_variables convenience Release
top="$(pwd)"
stage="$(pwd)/stage"
# load autobuild provided shell functions and variables
source_environment_tempfile="$stage/source_environment.sh"
"$autobuild" source_environment > "$source_environment_tempfile"
. "$source_environment_tempfile"
build=${AUTOBUILD_BUILD_ID:=0}
echo "${OGG_VERSION}-${VORBIS_VERSION}.${build}" > "${stage}/VERSION.txt"
......@@ -68,7 +67,7 @@ case "$AUTOBUILD_PLATFORM" in
;;
darwin*)
pushd "$OGG_SOURCE_DIR"
opts="-arch $AUTOBUILD_CONFIGURE_ARCH $LL_BUILD"
opts="-arch $AUTOBUILD_CONFIGURE_ARCH $LL_BUILD_RELEASE"
export CFLAGS="$opts"
export CPPFLAGS="$opts"
export LDFLAGS="$opts"
......@@ -89,7 +88,7 @@ case "$AUTOBUILD_PLATFORM" in
;;
linux*)
pushd "$OGG_SOURCE_DIR"
opts="-m$AUTOBUILD_ADDRSIZE $LL_BUILD"
opts="-m$AUTOBUILD_ADDRSIZE $LL_BUILD_RELEASE"
CFLAGS="$opts" CXXFLAGS="$opts" ./configure --prefix="$stage"
make
make install
......@@ -111,6 +110,3 @@ mkdir -p "$stage/LICENSES"
pushd "$OGG_SOURCE_DIR"
cp COPYING "$stage/LICENSES/ogg-vorbis.txt"
popd
pass
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment