summaryrefslogtreecommitdiff
path: root/.ci/configure.sh
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-08-08 09:38:24 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-08-08 09:38:25 -0400
commit1edf1295e8326ad315d24decea297d9f8ce22419 (patch)
tree61d44c2f737772d0aad66c11e6168d5d67f0bd57 /.ci/configure.sh
parente382bac1a01a152d32a0f95df7a2ad6b84ae80d4 (diff)
ci: automatically clear config.cache if it cannot be used
Summary: if env vars change between runs then the cache is invalidated, causing configure to print a very specific error by running a separate script to catch this error, the build can detect and clear the cache when necessary to avoid having to manually disable the cache when changing build settings Depends on D6697 Reviewers: stefan_schmidt, bu5hm4n Reviewed By: bu5hm4n Subscribers: bu5hm4n, cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6732
Diffstat (limited to '.ci/configure.sh')
-rwxr-xr-x.ci/configure.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/.ci/configure.sh b/.ci/configure.sh
new file mode 100755
index 0000000000..fc2b231081
--- /dev/null
+++ b/.ci/configure.sh
@@ -0,0 +1,12 @@
1#!/bin/bash
2
3
4set -o pipefail
5export TEST_VAR=1
6if ! ./configure $@ | tee -a configlog ; then
7 if grep -q 'configure: error: changes in the environment can compromise the build' configlog ; then
8 echo "clearing config.cache and retrying..."
9 rm -f configlog config.cache
10 ./configure $@
11 fi
12fi