]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - make/calcdep.pl
Remove unnecessary std::string::c_str() calls
[user/henk/code/inspircd.git] / make / calcdep.pl
index 5130388430949a3b0509e1c96c327013c532f3c4..65e19773e0e29fe1c08d84b408a59954464f8750 100755 (executable)
@@ -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;
        }
 
@@ -250,7 +256,7 @@ sub dep_dir($$) {
        if (@ofiles) {
                my $ofiles = join ' ', @ofiles;
                print MAKE "$outdir.so: $ofiles\n";
-               print MAKE "\t@\$(SOURCEPATH)/make/unit-cc.pl link-dir\$(VERBOSE) \$\@ \$^ \$>\n";
+               print MAKE "\t@\$(SOURCEPATH)/make/unit-cc.pl link-dir\$(VERBOSE) \$\@ ${\SOURCEPATH}/src/$dir \$^ \$>\n";
                return 1;
        } else {
                return 0;