diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-18 21:14:22 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-18 21:14:22 +0000 |
commit | 60e7701764c2ce01602d2dd35a29c861c9ccef0c (patch) | |
tree | 77255a3b0982764c087be78d1c44285a3d35c1f0 | |
parent | c4b1692a7568078ec87e256a7dc4d2402be79fab (diff) |
Fix the dependency checking to not rebuild an entire module dir when one file is changed
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6389 e03df62e-2008-0410-955e-edbf42e46eb7
-rwxr-xr-x | configure | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1256,23 +1256,24 @@ EOCHEESE if (opendir(MDIRHANDLE, "src/modules/$name") != 0) { print "Composing Makefile rules for directory \033[1;32m$name\033[0m... "; my $i = 0; - print FILEHANDLE "$name.so: ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h ../../include/inspircd_config.h ../../include/inspircd.h ../../include/configreader.h $deps"; + print FILEHANDLE "$name.so: ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h ../../include/inspircd_config.h ../../include/inspircd.h ../../include/configreader.h"; foreach $fname (sort readdir(MDIRHANDLE)) { if ($fname =~ /\.cpp$/) { $cmflags = getcompilerflags("src/modules/$name/$fname"); $liflags = getlinkerflags("src/modules/$name/$fname"); $deps = getdependencies("src/modules/$name/$fname"); - print FILEHANDLE " $name/$fname"; $oname = $fname; $oname =~ s/\.cpp$/.o/g; - $crapola = $crapola . " \$(CC) -pipe -I../../include -I. \$(FLAGS) $cmflags -export-dynamic -o $name/$oname -c $name/$fname\n"; + print FILEHANDLE " $name/$oname"; + $crapola = $crapola . "$name/$oname: $name/$fname ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h ../../include/inspircd_config.h ../../include/inspircd.h ../../include/configreader.h $deps\n"; + $crapola = $crapola . " \$(CC) -pipe -I../../include -I. \$(FLAGS) $cmflags -export-dynamic -o $name/$oname -c $name/$fname\n\n"; $crap3 = $crap3 . " $name/$oname"; $i++; } } print "(\033[1;32m$i files found\033[0m)\n"; - print FILEHANDLE "\n$crapola"; - print FILEHANDLE " \$(CC) -pipe $liflags -shared -o $name.so $crap3\n\n"; + print FILEHANDLE "\n \$(CC) -pipe $liflags -shared -o $name.so $crap3\n"; + print FILEHANDLE "\n$crapola\n"; closedir(MDIRHANDLE); $crud = $crud . " install -m \$(INSTMODE) $name.so \$(MODPATH)\n"; } |