Skip to content

Commit bb2a4af

Browse files
committed
configure: rename sub_error to sub_info_error for consistency
Rename 'sub_error' to 'sub_info_error' to make its usage more clear, and remove incorrect comments. Since 'info' is (optionally) followed by 'sub_info' to provide more information, it would seem like 'error' and 'sub_error' would have the same relationship - but the naming was misleading, sub_error is actually a form of sub_info which gives additional information regarding a prior 'info'.
1 parent 32ce7f4 commit bb2a4af

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

configure

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ sub_info()
2727
echo " ... $1"
2828
}
2929

30-
# Output an error message, may be followed by a call to sub_error to provide additional information
31-
error()
30+
# Output additional error information, and exit (intended to follow call to info)
31+
sub_info_error()
3232
{
33-
>&2 echo "Error: $1"
33+
>&2 echo " ... Error: $1"
3434
exit 1
3535
}
3636

37-
# Output additional error information (intended to follow call to error)
38-
sub_error()
37+
# Output an error message, and exit
38+
error()
3939
{
40-
>&2 echo " ... Error: $1"
40+
>&2 echo "Error: $1"
4141
exit 1
4242
}
4343

@@ -77,7 +77,7 @@ cxx_works()
7777
sub_info "Yes."
7878
else
7979
rm -f "$configtmpdir"/testfile*
80-
sub_error "It seems that \"$1\" is not a working C++ compiler. Please specify a compiler."
80+
sub_info_error "It seems that \"$1\" is not a working C++ compiler. Please specify a compiler."
8181
fi
8282
}
8383

@@ -569,7 +569,7 @@ if [ -z "${CXX:-}" ]; then
569569
fi
570570
done
571571
if [ -z "${CXX:-}" ]; then
572-
sub_error "No C++ compiler found!"
572+
sub_info_error "No C++ compiler found!"
573573
fi
574574
fi
575575
cxx_works "$CXX"
@@ -580,7 +580,7 @@ fi
580580
## Test compiler/linker supported arguments
581581
if [ "$AUTO_CXXFLAGS" = "true" ]; then
582582
if ! check_cxx_argument CXXFLAGS -std=c++11 MANDATORY; then
583-
sub_error "The C++ compiler ($CXX) doesn't accept '-std=c++11' and may be too old."
583+
sub_info_error "The C++ compiler ($CXX) doesn't accept '-std=c++11' and may be too old."
584584
fi
585585
for argument in -Wall \
586586
-Os \

0 commit comments

Comments
 (0)