Skip to content

Instantly share code, notes, and snippets.

@stomita
Created May 18, 2012 12:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stomita/2725125 to your computer and use it in GitHub Desktop.
Save stomita/2725125 to your computer and use it in GitHub Desktop.
#!/bin/bash
COMPILE_JOBS=1
PREFIX="/app/vendor/phantomjs"
QT_CFG="-I$PREFIX/include -L$PREFIX/lib"
until [ -z "$1" ]; do
case $1 in
"--qt-config")
shift
QT_CFG+=" $1"
shift;;
"--jobs")
shift
COMPILE_JOBS=$1
shift;;
"--help")
echo "Usage: $0 [--qt-config CONFIG] [--jobs NUM]"
echo
echo " --qt-config CONFIG Specify extra config options to be used when configuring Qt"
echo " --jobs NUM How many parallel compile jobs to use. Defaults to 4."
echo
exit 0
;;
*)
echo "Unrecognised option: $1"
exit 1;;
esac
done
cd src/qt && ./preconfig.sh --jobs $COMPILE_JOBS --qt-config "$QT_CFG" && cd ../..
src/qt/bin/qmake
make -j$COMPILE_JOBS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment