From 293df6a8b55e89c127e60e92711ef0ef1027bff8 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 16 Dec 2005 18:10:38 +0000 Subject: Split all commands into seperate files and redid command system to take classes, not function pointers (function pointers suck ass) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2534 e03df62e-2008-0410-955e-edbf42e46eb7 --- configure | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 83eb03606..fc798310f 100755 --- a/configure +++ b/configure @@ -1060,12 +1060,29 @@ wildcard.o: wildcard.cpp ../include/base.h ../include/wildcard.h ../include/insp socket.o: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp - EOM close(FH); } sub write_dynamic_makefile { + + my $i = 0; + my @cmdlist = (); + opendir(DIRHANDLE, "src"); + foreach $name (sort readdir(DIRHANDLE)) { + if ($name =~ /^cmd_(.+)\.cpp$/) { + $cmdlist[$i++] = $1; + } + } + closedir(DIRHANDLE); + + my $cmdobjs = ""; + my $srcobjs = ""; + foreach my $cmd (@cmdlist) { + $cmdobjs = $cmdobjs . "cmd_$cmd.o "; + $srcobjs = $srcobjs . "cmd_$cmd.cpp "; + i} + open(FH,">src/Makefile") or die("Could not write src/Makefile"); print FH <