summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-11-16 10:26:27 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-11-16 10:26:27 +0100
commitbbc6a0bbbe7475e5e1d0c4f2418c6fe6e0e952b7 (patch)
treea4678e1f07e94c5aee8bbf0378a247e513b59e26 /make
parenta71f34e4b17420cacc4a50c5af64fe15811a8148 (diff)
Refuse to link modules to the core binary in dynamic builds
Fixes issue #912
Diffstat (limited to 'make')
-rwxr-xr-xmake/calcdep.pl6
1 files changed, 6 insertions, 0 deletions
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;
}