From 78b0de212cc9d2f09b77fa749e5d37047566ee7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 3 Oct 2016 13:36:10 +0200 Subject: Clean and re-run configure when --enable-native-libs is used The OTP repository contains pre-built BEAM files that will not get recompiled natively unless "make clean" is called first. This commit detects when the --enable-native-libs option is used and runs the appropriate commands. Depending on the source of the code, this will result in the configure step being run twice, as a Makefile is needed before we can do "make clean". Configure will be run once otherwise. --- kerl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kerl b/kerl index dbd767a..5b74a63 100755 --- a/kerl +++ b/kerl @@ -556,6 +556,11 @@ _do_build() CFLAGS="$CFLAGS" ./otp_build configure $KERL_CONFIGURE_OPTIONS >> "$LOGFILE" 2>&1 fi + echo -n $KERL_CONFIGURE_OPTIONS | grep "--enable-native-libs" 1>/dev/null 2>&1 + if [ $? -ne 0 ]; then + make clean >> "$LOGFILE" 2>&1 + CFLAGS="$CFLAGS" ./otp_build configure $KERL_CONFIGURE_OPTIONS >> "$LOGFILE" 2>&1 + fi if [ $? -ne 0 ]; then show_logfile "Configure failed." "$LOGFILE" list_remove builds "$1 $2" -- cgit v1.2.3