diff options
author | frostycoolslug <frostycoolslug@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-28 00:00:37 +0000 |
---|---|---|
committer | frostycoolslug <frostycoolslug@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-28 00:00:37 +0000 |
commit | bb617e4b6efacbcfa7e12dba76a088b7bdc2cc95 (patch) | |
tree | 54e1bab46604197f52330fbc4bfa094da4cdbb3d | |
parent | c989a5d7f2e0d5c18eae40b0b24859ef72ff38fb (diff) |
Added support back for ./inspircd
Added a line to automatically chmod ./inspircd to 0744 ('Last Second Save!')
./configure now supports any future .file.inc includes (Yes, i can see into the future)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1227 e03df62e-2008-0410-955e-edbf42e46eb7
-rwxr-xr-x | configure | 53 |
1 files changed, 35 insertions, 18 deletions
@@ -375,13 +375,6 @@ EOF } close(FILEHANDLE); - # Now the Makefile.. - print "Writing \033[1;32mMakefile\033[0m\n"; - my $makefile = ""; - open(FILEHANDLE, ".Makefile.inc"); - while (<FILEHANDLE>) { - $makefile .= $_; - } # Create a Modules List.. my $modules = ""; foreach $i (@modlist) @@ -389,17 +382,41 @@ EOF $modules .= "m_".$i.".so "; } chomp($modules); # Remove Redundant whitespace.. - $makefile =~ s/\@MAKEPROG\@/$config{MAKEPROG}/; - $makefile =~ s/\@FLAGS\@/$config{FLAGS}/; - $makefile =~ s/\@LDLIBS\@/$config{LDLIBS}/; - $makefile =~ s/\@CONFIG_DIR\@/$config{CONFIG_DIR}/; - $makefile =~ s/\@MODULE_DIR\@/$config{MODULE_DIR}/; - $makefile =~ s/\@BINARY_DIR\@/$config{BINARY_DIR}/; - $makefile =~ s/\@MODULES\@/$modules/; - - open(FILEHANDLE, ">Makefile"); - print FILEHANDLE $makefile; - close(FILEHANDLE); + + + # Write all .in files. + my $tmp = ""; + my $file = ""; + opendir(DIRHANDLE, $this); + foreach $name (sort readdir(DIRHANDLE)) { + if ($name =~ /^\.(.+)\.inc$/) + { + $file = $1; + # All .name.inc files need parsing! + $tmp = ""; + open(FILEHANDLE, ".$file.inc"); + while (<FILEHANDLE>) { + $tmp .= $_; + } + close(FILEHANDLE); + + $tmp =~ s/\@MAKEPROG\@/$config{MAKEPROG}/; + $tmp =~ s/\@FLAGS\@/$config{FLAGS}/; + $tmp =~ s/\@LDLIBS\@/$config{LDLIBS}/; + $tmp =~ s/\@CONFIG_DIR\@/$config{CONFIG_DIR}/; + $tmp =~ s/\@MODULE_DIR\@/$config{MODULE_DIR}/; + $tmp =~ s/\@BINARY_DIR\@/$config{BINARY_DIR}/; + $tmp =~ s/\@MODULES\@/$modules/; + + print "Writing \033[1;32m$file\033[0m\n"; + open(FILEHANDLE, ">$file"); + print FILEHANDLE $tmp; + } + } + closedir(DIRHANDLE); + + # Make inspircd executable! + chmod 0744, 'inspircd'; # Modules Makefile.. print "Writing \033[1;32msrc/modules/Makefile\033[0m\n"; |