Permalink
Browse files

Add --downloadcache to ./configure's list of options

Use this in Autobuild.sh to avoid storing stuff in git checkout dir
  • Loading branch information...
1 parent 0e77ef3 commit 5d80a19af5d0242513bf2dfce7409f6ceadd8b98 @andoma committed Jan 20, 2014
Showing with 24 additions and 11 deletions.
  1. +7 −1 Autobuild/osx.sh
  2. +6 −1 Autobuild/ps3.sh
  3. +5 −6 Autobuild/rpi.sh
  4. +6 −3 support/configure.inc
View
@@ -1,5 +1,6 @@
build()
{
+ set +e
which ccache >/dev/null
if [ $? -eq 0 ]; then
echo "Using ccache"
@@ -9,8 +10,13 @@ build()
else
USE_CCACHE=""
fi
+ set -e
- ./configure.osx ${RELEASE} --cleanbuild ${USE_CCACHE}
+ set -x
+ ./configure.osx ${RELEASE} --cleanbuild ${USE_CCACHE} \
+ --downloadcache="${WORKINGDIR}/downloadcache"
+
+ set +x
make ${JARGS} dist
artifact build.osx/Showtime.dmg dmg application/octet-stream Showtime.dmg
View
@@ -49,7 +49,12 @@ build()
USE_CCACHE=""
fi
- ./configure.ps3 ${JOBSARGS} --build=${TARGET} ${RELEASE} --cleanbuild ${USE_CCACHE}
+ ./configure.ps3 --build=${TARGET} \
+ ${RELEASE} \
+ --cleanbuild \
+ ${USE_CCACHE} \
+ --downloadcache="${WORKINGDIR}/downloadcache"
+
make ${JARGS} BUILD=${TARGET} pkg self
artifact build.${TARGET}/showtime.self self application/octect-stream showtime.self
View
@@ -61,6 +61,7 @@ build()
fi
+ set +e
which ccache >/dev/null
if [ $? -eq 0 ]; then
echo "Using ccache"
@@ -69,20 +70,18 @@ build()
else
USE_CCACHE=""
fi
-
-
-
-
+ set -e
set -x
-
./configure.rpi --build=${TARGET} \
--toolchain="${TOOLCHAIN}/bin/arm-linux-gnueabihf-" \
--sysroot="${SYSROOT}" \
${RELEASE} \
--cleanbuild \
- ${USE_CCACHE}
+ ${USE_CCACHE} \
+ --downloadcache="${WORKINGDIR}/downloadcache"
+ set +x
make ${JARGS} BUILD=${TARGET} squashfs
artifact build.${TARGET}/showtime.sqfs sqfs application/octet-stream showtime.sqfs
View
@@ -14,6 +14,7 @@
TOPDIR=`pwd`
BUILD=${CONFIGURE_POSTFIX}
TMPDIR=${TOPDIR}/tmp
+DOWNLOADCACHE=${TOPDIR}/.downloadcache
GLW_DEFAULT_SKIN="default"
DEFAULT_LOGTARGET=""
@@ -173,8 +174,8 @@ cp_if_changed(){
download_file() {
local __resultvar=$2
local URL_HASH=`echo "$1" | ${SHASUM} | awk '{print $1}'`
- mkdir -p ${TOPDIR}/.downloadcache
- local DLPATH=${TOPDIR}/.downloadcache/${URL_HASH}
+ mkdir -p "${DOWNLOADCACHE}"
+ local DLPATH="${DOWNLOADCACHE}/${URL_HASH}"
if [ ! -f "${DLPATH}" ]; then
echo "Downloading $1"
curl -f -L -o "${DLPATH}" "$1" || die_cause "Unable to download file"
@@ -193,12 +194,12 @@ common_help(){
echo "Standard options:"
echo " --help Print this message"
echo " --build=BUILD Build in build.BUILD [build.$BUILD]"
- echo " --jobs=N Allow N jobs at once"
echo " --release Stage for release"
echo " --cleanbuild Erase builddir before configuring"
echo " --ccache Enable use of ccache"
echo " --extra-cflags Extra cflags"
echo " --extra-ldflags Extra ldflags"
+ echo " --downloadcache Where to download files during build [$DOWNLOADCACHE]"
echo ""
echo "Platform specific options:"
}
@@ -215,6 +216,8 @@ common_opt(){
;;
--extra-ldflags=*) EXTRA_LDFLAGS="$2"
;;
+ --downloadcache=*) DOWNLOADCACHE="$2"
+ ;;
--enable-?*|--disable-?*)
eval $(echo "$1" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')

0 comments on commit 5d80a19

Please sign in to comment.