summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-07 01:51:21 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-07 01:51:21 +0000
commit8424e1367b33e8605361cd8aa4584405e4a74fd7 (patch)
tree1cdaf04f641d43e62683e050031ac39a0d4de27b /make
parent42a28a83e58658daa106ea9d1ef9b916240d0a80 (diff)
Add basic module manager, patch courtesy of danieldg.. still needs some work/review, but looks good
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10426 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'make')
-rw-r--r--make/configure.pm17
1 files changed, 16 insertions, 1 deletions
diff --git a/make/configure.pm b/make/configure.pm
index e9c1a04c3..ba586e3e6 100644
--- a/make/configure.pm
+++ b/make/configure.pm
@@ -20,7 +20,7 @@ use warnings FATAL => qw(all);
use Exporter 'import';
use POSIX;
use make::utilities;
-our @EXPORT = qw(promptnumeric dumphash is_dir getmodules getrevision getcompilerflags getlinkerflags getdependencies nopedantic resolve_directory yesno showhelp promptstring_s);
+our @EXPORT = qw(promptnumeric dumphash is_dir getmodules getrevision getcompilerflags getlinkerflags getdependencies getmodversion nopedantic resolve_directory yesno showhelp promptstring_s);
my $no_svn = 0;
@@ -117,6 +117,21 @@ sub getdependencies {
return "";
}
+sub getmodversion {
+ my ($file) = @_;
+ open(FLAGS, $file) or return "";
+ while (<FLAGS>) {
+ if ($_ =~ /^\/\* \$ModVersion: (.+) \*\/$/) {
+ my $x = translate_functions($1, $file);
+ next if ($x eq "");
+ close(FLAGS);
+ return $x;
+ }
+ }
+ close(FLAGS);
+ return "";
+}
+
sub nopedantic {
my ($file) = @_;
open(FLAGS, $file) or return "";