From bbc6a0bbbe7475e5e1d0c4f2418c6fe6e0e952b7 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 16 Nov 2015 10:26:27 +0100 Subject: Refuse to link modules to the core binary in dynamic builds Fixes issue #912 --- make/calcdep.pl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'make/calcdep.pl') diff --git a/make/calcdep.pl b/make/calcdep.pl index 2348edceb..65e19773e 100755 --- a/make/calcdep.pl +++ b/make/calcdep.pl @@ -85,6 +85,12 @@ END my $out = find_output $file; dep_cpp $file, $out, 'gen-o'; next if $file =~ m#^socketengines/# && $file ne "socketengines/socketengine_$ENV{SOCKETENGINE}.cpp"; + # Having a module in the src directory is a bad idea because it will be linked to the core binary + if ($file =~ /^(m|core)_.*\.cpp/) { + my $correctsubdir = ($file =~ /^m_/ ? "modules" : "coremods"); + print "Error: module $file is in the src directory, put it in src/$correctsubdir instead!\n"; + exit 1; + } push @core_deps, $out; } -- cgit v1.2.3