summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-01 15:05:26 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-01 15:05:26 +0000
commitd1188236f2e731b0a6d59bb2abaa218d5dc8fd60 (patch)
treeb3bf4c330882a0f89132bfbdb78346d749ec0c63 /configure
parent94d5c29f63f806f0c1de5d8eda2ae98d268b84f1 (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
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure13
1 files changed, 9 insertions, 4 deletions
diff --git a/configure b/configure
index 09dbafd2d..06cc0c78c 100755
--- a/configure
+++ b/configure
@@ -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: $!";