aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-03-07 22:54:15 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-03-07 22:54:15 +0100
commit2542aca4a538a37061bc80cab68ef503ac063838 (patch)
treef40b3d7cf6aab4dcc92de86ed53eeb9c6f42d19a /build-aux
parent41b676e267c2a025012d2cd4264947d746783bfe (diff)
downloadblogc-2542aca4a538a37061bc80cab68ef503ac063838.tar.gz
blogc-2542aca4a538a37061bc80cab68ef503ac063838.tar.bz2
blogc-2542aca4a538a37061bc80cab68ef503ac063838.zip
travis: actually commit the build script
Diffstat (limited to 'build-aux')
-rwxr-xr-xbuild-aux/build-travis.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/build-aux/build-travis.sh b/build-aux/build-travis.sh
new file mode 100755
index 0000000..68f8b05
--- /dev/null
+++ b/build-aux/build-travis.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -ex
+
+rm -rf build
+mkdir -p build
+
+MAKE_TARGET="${TARGET}"
+
+if test "x${TARGET}" = "xw*"; then
+ unset CC
+ export CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"
+ export CHOST="x86_64-w64-mingw32"
+ test "x${TARGET}" = "xw32" && export CHOST="i686-w64-mingw32"
+ MAKE_TARGET="all"
+else
+ export CFLAGS="-Wall -g"
+ export CONFIGURE_ARGS="--enable-tests --enable-valgrind"
+fi
+
+pushd build > /dev/null
+
+../configure \
+ ${CHOST:+--host=${CHOST} --target=${CHOST}} \
+ --enable-ronn \
+ --disable-silent-rules \
+ ${CONFIGURE_ARGS}
+
+popd > /dev/null
+
+make -C build "${MAKE_TARGET}"