summaryrefslogtreecommitdiff
path: root/make/configure.pm
diff options
context:
space:
mode:
Diffstat (limited to 'make/configure.pm')
-rw-r--r--make/configure.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/make/configure.pm b/make/configure.pm
index fd1833d5f..763423be6 100644
--- a/make/configure.pm
+++ b/make/configure.pm
@@ -52,6 +52,8 @@ our @EXPORT = qw(CONFIGURE_CACHE_FILE
run_test
test_file
test_header
+ module_expand
+ module_shrink
write_configure_cache
get_compiler_info
find_compiler
@@ -221,6 +223,18 @@ sub test_header($$;$) {
return !$?;
}
+sub module_expand($) {
+ my $module = shift;
+ $module = "m_$module" unless $module =~ /^(?:m|core)_/;
+ $module = "$module.cpp" unless $module =~ /\.cpp$/;
+ return $module;
+}
+
+sub module_shrink($) {
+ my $module = basename shift;
+ return $module =~ s/(?:^m_|\.cpp$)//gr;
+}
+
sub write_configure_cache(%) {
unless (-e CONFIGURE_DIRECTORY) {
print_format "Creating <|GREEN ${\abs2rel CONFIGURE_DIRECTORY, CONFIGURE_ROOT}|> ...\n";