From bea4561f3bddbac69a324240039331419745e5be Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 21 Dec 2005 09:50:31 +0000 Subject: Added new cmd_*.cpp stuff to static makefile generation git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2592 e03df62e-2008-0410-955e-edbf42e46eb7 --- configure | 73 ++++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 47 insertions(+), 26 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 9e34de613..1a6ddd2a8 100755 --- a/configure +++ b/configure @@ -980,6 +980,21 @@ sub yesno { sub write_static_makefile { open(FH,">src/Makefile") or die("Could not write src/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 "; + } print FH <src/Makefile") or die("Could not write src/Makefile"); print FH <