Skip to content

Commit 9cac967

Browse files
committed
Fixed typo and made caf.in more robust
1 parent 344ac30 commit 9cac967

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/extensions/caf.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ oca_compiler="@opencoarrays_aware_compiler@" # True for GFortran > 5.0.0
6161

6262
# Compiler used to build OpenCoarrays; runtime must match compiler used during build
6363
cafc="@Fortran_COMPILER@"
64-
if [[ "${cafc}" == @*@ ]]; then
64+
if [[ "${cafc}" == @*@ || -z "${cafc}" ]]; then
6565
cafc=gfortran
6666
fi
6767
caf_mod_dir="@CAF_MODDIR@" # location of extensions module, needed for non-OCA compilers
@@ -176,7 +176,7 @@ __only_compiling () {
176176
substitute_lib () {
177177
# Try to substitute a shared or static library if requested library is missing
178178
# Some package managers only install dynamic or static libs
179-
if ! [[ -f "${1}" ]] ; then
179+
if ! [[ -f "${1}" && "${1}" = *.* ]] ; then
180180
case "${1##*.}" in
181181
a|lib)
182182
for suff in so dylib dll ; do
@@ -370,7 +370,7 @@ if "${cafc}" "${compiler_args[@]}" ; then
370370
exit $?
371371
else
372372
return_code=$?
373-
echo "Error: comand:" >&2
373+
echo "Error: command:" >&2
374374
echo " \`${cafc} ${compiler_args[*]}\`" >&2
375375
echo "failed to compile." >&2
376376
exit "${return_code}"

0 commit comments

Comments
 (0)