X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Fconfigure.pm;h=b20639d3480e84e3f78784a41636feac60d59c07;hb=aa0221d87ca355d5021f81f8f65cf6a47bc93c38;hp=150dc6af52f049b019a20d8c9102ba0e6d3e2271;hpb=2f12f76ec9561a6c1d522e3e6d81723ed9a07356;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/configure.pm b/make/configure.pm index 150dc6af5..b20639d34 100644 --- a/make/configure.pm +++ b/make/configure.pm @@ -1,6 +1,7 @@ # # InspIRCd -- Internet Relay Chat Daemon # +# Copyright (C) 2020 Nicole Kleinhoff # Copyright (C) 2013-2020 Sadie Powell # Copyright (C) 2012 Robby # Copyright (C) 2007-2008 Craig Edwards @@ -45,12 +46,15 @@ use constant CONFIGURE_ERROR_PIPE => $ENV{INSPIRCD_VERBOSE} ? '' : '1>/dev/nu our @EXPORT = qw(CONFIGURE_CACHE_FILE CONFIGURE_CACHE_VERSION + CONFIGURE_DIRECTORY cmd_clean cmd_help cmd_update run_test test_file test_header + module_expand + module_shrink write_configure_cache get_compiler_info find_compiler @@ -175,8 +179,10 @@ FLAGS will search for c++, g++, clang++ or icpc. If you have any problems with configuring InspIRCd then visit our IRC channel -at irc.inspircd.org #InspIRCd for support. +at irc.inspircd.org #InspIRCd or create a support discussion at +https://github.com/inspircd/inspircd/discussions. +Packagers: see https://docs.inspircd.org/packaging/ for packaging advice. EOH exit 0; } @@ -219,6 +225,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";