diff --git a/.gitignore b/.gitignore index 287f614b..0f861b2d 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,5 @@ missing mkinstalldirs omf.make stamp-* +testbuild.log xmldocs.make diff --git a/testbuild.sh b/testbuild.sh new file mode 100755 index 00000000..eb1006a0 --- /dev/null +++ b/testbuild.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# testbuild.sh - Build GParted, logging top commit and build results. +# Command line parameters are passed to autogen.sh. +# MAKEFLAGS environment variable overrides make flags. +# +# Copyright (C) 2013 Mike Fleetwood +# +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. + + +exec 1>> testbuild.log 2>&1 +echo '############################################################' +echo "## Build date: `date`" +echo '############################################################' +git log -1 +echo '############################################################' + +set -x + +if [ "X$MAKEFLAGS" = 'X' ]; then + # Default to using the number of processors to tell make how + # many jobs to run simultaneously + nproc=`grep -c '^processor' /proc/cpuinfo` || nproc=1 + MAKEFLAGS="-j $nproc" + export MAKEFLAGS +fi + +# Disable bold text escape sequences from gnome-autogen.sh +TERM= + +./autogen.sh "${@}" && make clean && make $MAKEFLAGS