From: danieldg Date: Wed, 2 Sep 2009 18:33:16 +0000 (+0000) Subject: Include VERSION/REVISION information in module version tag, so that we do no longer... X-Git-Tag: v2.0.23~1576 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=3e26f42a8f50905899fdd51c9bbf6d83c21a3321;p=user%2Fhenk%2Fcode%2Finspircd.git Include VERSION/REVISION information in module version tag, so that we do no longer rely on $Id$ git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11666 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/include/inspircd.h b/include/inspircd.h index f16a1a40d..92e446e03 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -74,6 +74,7 @@ typedef std::vector< KeyVal > KeyValList; typedef std::multimap< std::string, KeyValList > ConfigDataHash; #include "inspircd_config.h" +#include "inspircd_version.h" #include "numerics.h" #include "uid.h" #include "users.h" diff --git a/include/modules.h b/include/modules.h index ce93f4b16..86f77d218 100644 --- a/include/modules.h +++ b/include/modules.h @@ -277,7 +277,7 @@ class CoreExport Version : public classbase public: /** Version information. */ - std::string version; + const std::string version; /** Flags and API version */ @@ -285,7 +285,8 @@ class CoreExport Version : public classbase /** Initialize version class */ - Version(const std::string &sversion, int flags, int api_ver); + Version(const std::string &customver, int flags, + int api_ver = API_VERSION, const std::string& src_rev = VERSION " r" REVISION); }; /** The ModuleMessage class is the base class of Request and Event diff --git a/make/calcdep.pl b/make/calcdep.pl index 484c98cbd..c2e9b9510 100755 --- a/make/calcdep.pl +++ b/make/calcdep.pl @@ -16,6 +16,7 @@ sub gendep { while (<$in>) { if (/^\s*#\s*include\s*"([^"]+)"/) { my $inc = $1; + next if $inc eq 'inspircd_version.h' && $f eq '../include/inspircd.h'; my $found = 0; for my $loc ("$basedir/$inc", "../include/$inc") { next unless -e $loc; diff --git a/src/modules.cpp b/src/modules.cpp index 2e3623b4a..f0ff37726 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -27,8 +27,8 @@ // version is a simple class for holding a modules version number -Version::Version(const std::string &sversion, int flags, int api_ver) -: version(sversion), Flags(flags), API(api_ver) +Version::Version(const std::string &modv, int flags, int api_ver, const std::string& rev) +: version(modv + " " + rev), Flags(flags), API(api_ver) { }