@@ -253,7 +253,7 @@ find_or_install()
253253 stack_push dependency_path " none"
254254
255255 elif [[ " $package_in_path " == " true" ]]; then
256- printf " $this_script : Checking whether $executable in PATH wraps gfortran version 5.1.0 or later ... "
256+ printf " $this_script : Checking whether $executable in PATH wraps gfortran... "
257257 mpif90__version_header=` mpif90 --version | head -1`
258258 first_three_characters=` echo $mpif90__version_header | cut -c1-3`
259259 if [[ " $first_three_characters " != " GNU" ]]; then
@@ -263,18 +263,14 @@ find_or_install()
263263 stack_push dependency_exe " none" $executable " gfortran"
264264 stack_push dependency_path " none" ` ./build $package --default --query-path` ` ./build gcc --default --query-path`
265265 else
266- $executable -o acceptable_compiler acceptable_compiler.f90
267- $executable -o print_true print_true.f90
268- is_true=` ./print_true`
266+ printf " yes.\n"
267+ printf " $this_script : Checking whether $executable in PATH wraps gfortran version 5.1.0 or later... "
268+ $executable acceptable_compiler.f90 -o acceptable_compiler
269+ $executable print_true.f90 -o print_true
269270 acceptable=` ./acceptable_compiler`
271+ is_true=` ./print_true`
270272 rm acceptable_compiler print_true
271- if [[ " $acceptable " == " $is_true " ]]; then
272- printf " no.\n"
273- # Trigger 'find_or_install gcc' and subsequent build of $package
274- stack_push dependency_pkg " none" $package " gcc"
275- stack_push dependency_exe " none" $executable " gfortran"
276- stack_push dependency_path " none" ` ./build $package --default --query-path` ` ./build gcc --default --query-path`
277- else
273+ if [[ " $acceptable " == " $is_true " ]]; then
278274 printf " yes.\n"
279275 printf " $this_script : Using the $executable found in the PATH.\n"
280276 export MPIFC=mpif90
@@ -285,6 +281,12 @@ find_or_install()
285281 stack_push dependency_pkg " none"
286282 stack_push dependency_exe " none"
287283 stack_push dependency_path " none"
284+ else
285+ printf " no\n"
286+ # Trigger 'find_or_install gcc' and subsequent build of $package
287+ stack_push dependency_pkg " none" $package " gcc"
288+ stack_push dependency_exe " none" $executable " gfortran"
289+ stack_push dependency_path " none" ` ./build $package --default --query-path` ` ./build gcc --default --query-path`
288290 fi
289291 fi
290292
@@ -454,6 +456,10 @@ find_or_install()
454456 if [[ " $package_version_in_path " < " $package (GNU Bison) $minimum_version " ]]; then
455457 printf " yes.\n"
456458 export YACC=" $package_install_path /bin/yacc"
459+ # Halt the recursion and signal that there are no prerequisites to build
460+ stack_push dependency_pkg " none"
461+ stack_push dependency_exe " none"
462+ stack_push dependency_path " none"
457463 else
458464 printf " no.\n"
459465 printf " $this_script : Using the $package executable $executable found in the PATH.\n"
0 commit comments