summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2013-08-04 16:03:17 +0100
committerPeter Powell <petpow@saberuk.com>2013-08-04 17:48:49 +0100
commitff15b6d2ade507d836cf31c4630aa3aad7075c30 (patch)
treeb5dfb0a2c1cb4367ddd267626e4b4895430f90cf /make
parentd24619c012b34d5a3d4cfb93e7bea3ff3d5721e7 (diff)
Refactor duplicate test code into a run_test subroutine.
Diffstat (limited to 'make')
-rw-r--r--make/configure.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/make/configure.pm b/make/configure.pm
index de49bd53c..94b847e16 100644
--- a/make/configure.pm
+++ b/make/configure.pm
@@ -31,7 +31,7 @@ use warnings FATAL => qw(all);
use Exporter 'import';
use POSIX;
use make::utilities;
-our @EXPORT = qw(get_compiler_info find_compiler test_file test_header promptnumeric dumphash getmodules getrevision getcompilerflags getlinkerflags getdependencies nopedantic yesno showhelp promptstring_s module_installed);
+our @EXPORT = qw(get_compiler_info find_compiler run_test test_file test_header promptnumeric dumphash getmodules getrevision getcompilerflags getlinkerflags getdependencies nopedantic yesno showhelp promptstring_s module_installed);
my $revision;
@@ -68,6 +68,13 @@ sub find_compiler {
return "";
}
+sub run_test($$) {
+ my ($what, $result) = @_;
+ print "Checking whether $what is available... ";
+ print $result ? "yes\n" : "no\n";
+ return $result;
+}
+
sub test_file($$;$) {
my ($cc, $file, $args) = @_;
my $status = 0;