diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-01 15:05:26 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-01 15:05:26 +0000 |
commit | d1188236f2e731b0a6d59bb2abaa218d5dc8fd60 (patch) | |
tree | b3bf4c330882a0f89132bfbdb78346d749ec0c63 | |
parent | 94d5c29f63f806f0c1de5d8eda2ae98d268b84f1 (diff) |
Move VERSION/REVISION to their own header to avoid needless rebuilds on update
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11561 e03df62e-2008-0410-955e-edbf42e46eb7
-rwxr-xr-x | configure | 13 | ||||
-rw-r--r-- | src/inspircd.cpp | 2 | ||||
-rw-r--r-- | src/server.cpp | 1 |
3 files changed, 11 insertions, 5 deletions
@@ -1035,12 +1035,9 @@ sub writefiles { #define CONFIG_FILE "$config{CONFIG_DIR}/inspircd.conf" #define MOD_PATH "$config{MODULE_DIR}" -#define VERSION "$version" -#define REVISION "$revision2" #define SOMAXCONN_S "$config{_SOMAXCONN}" #define OPTIMISATION $config{OPTIMITEMP} #define LIBRARYDIR "$config{LIBRARY_DIR}" -#define SYSTEM "$incos" #define ENTRYPOINT int main(int argc, char** argv) EOF @@ -1123,7 +1120,15 @@ print FILEHANDLE "#define MAXBUF " . ($config{MAXBUF}+2) . "\n"; EOF close(FILEHANDLE); - for my $file (qw(include/inspircd_config.h include/inspircd_se_config.h)) { + open(FILEHANDLE, ">include/inspircd_version.h.tmp"); + print FILEHANDLE <<EOF; +#define VERSION "$version" +#define REVISION "$revision2" +#define SYSTEM "$incos" +EOF + close FILEHANDLE; + + for my $file (qw(include/inspircd_config.h include/inspircd_se_config.h include/inspircd_version.h)) { my $diff = 0; open my $fh1, $file or $diff = 1; open my $fh2, $file.'.tmp' or die "Can't read $file.tmp that we just wrote: $!"; diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 5321aaee9..3b41d787b 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -12,8 +12,8 @@ */ /* $Core */ -/* $Install: src/inspircd $(BINPATH) */ #include "inspircd.h" +#include "inspircd_version.h" #include <signal.h> #ifndef WIN32 diff --git a/src/server.cpp b/src/server.cpp index ab863f1a3..c5223561a 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -16,6 +16,7 @@ #include <signal.h> #include "exitcodes.h" #include "inspircd.h" +#include "inspircd_version.h" void InspIRCd::SignalHandler(int signal) |