]> granicus.if.org Git - php/commitdiff
Enable more control over travis/compile.sh
authorSara Golemon <pollita@php.net>
Tue, 18 Apr 2017 18:27:19 +0000 (11:27 -0700)
committerSara Golemon <pollita@php.net>
Tue, 18 Apr 2017 18:33:06 +0000 (11:33 -0700)
This is also used by RM process to test the same things.
Allow generating build output (to a log file) and specifying
number of parallel jobs (rather than hard-code zero).

Leave all defaults as-is for Travis builds.

travis/compile.sh

index bd127e716d8f62dc74f45b260bf29cce2066f5d0..ddf80f994d68e510e197e59233258a8b56f29317 100755 (executable)
@@ -9,10 +9,26 @@ if [[ "$ENABLE_DEBUG" == 1 ]]; then
 else
        DEBUG="";
 fi
+
+if [[ -z "$CONFIG_LOG_FILE" ]]; then
+       CONFIG_QUIET="--quiet"
+       CONFIG_LOG_FILE="/dev/stdout"
+else
+       CONFIG_QUIET=""
+fi
+if [[ -z "$MAKE_LOG_FILE" ]]; then
+       MAKE_QUIET="--quiet"
+       MAKE_LOG_FILE="/dev/stdout"
+else
+       MAKE_QUIET=""
+fi
+
+MAKE_JOBS=${MAKE_JOBS:-2}
+
 ./buildconf --force
 ./configure \
---prefix=$HOME"/php-install" \
---quiet \
+--prefix="$HOME"/php-install \
+$CONFIG_QUIET \
 $DEBUG \
 $TS \
 --enable-phpdbg \
@@ -59,6 +75,8 @@ $TS \
 --with-xpm-dir=/usr \
 --with-kerberos \
 --enable-sysvmsg \
---enable-zend-test
-make -j2 --quiet
-make install
+--enable-zend-test \
+> "$CONFIG_LOG_FILE"
+
+make "-j${MAKE_JOBS}" $MAKE_QUIET > "$MAKE_LOG_FILE"
+make install >> "$MAKE_LOG_FILE"