From 5d24c87d4bade9661cb4becc2c23853d47e6f55c Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Tue, 11 Feb 2020 01:04:22 +0100 Subject: Configure script won't crash without Fortran compiler, only a warning Until now, when a Fortran compiler didn't exist on the host operating system, the configure script would crash with a warning. But some projects may not need Fortran, so this is just an extra/annoying crash! With this commit, it will still print the warning, but instead of a crash, it will just sleep for some seconds, then continue. Later, when if a software needs Fortran, it's building will crash, but atleast the user was warned. In the future, we should add a step to check on the necessary software and see if Fortran is necessary for the project or not. The project configuration should indeed crash if Fortran is necessary, but we should tell the user that software XXXX needs Fortran so we can't continue without a Fortran compiler. Also, a small sentence ("Project's configuration will continue in XXXX seconds.") was added after all the warnings that won't cause a crash, so user's don't think its a crash. --- reproduce/software/shell/configure.sh | 73 ++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 27 deletions(-) diff --git a/reproduce/software/shell/configure.sh b/reproduce/software/shell/configure.sh index e8f2736..4c6c29a 100755 --- a/reproduce/software/shell/configure.sh +++ b/reproduce/software/shell/configure.sh @@ -273,6 +273,21 @@ static_build=no if type otool > /dev/null 2>/dev/null; then host_cc=1 on_mac_os=yes + cat < $testsource - echo " END" >> $testsource - if gfortran $testsource -o$testprog && $testprog; then - rm $testsource $testprog + sleep 5 else - rm $testsource - cat < $testsource + echo " END" >> $testsource + if gfortran $testsource -o$testprog && $testprog; then + rm $testsource $testprog + else + rm $testsource + cat <