Code auditing weekend results and fixes committing.
[silc.git] / prepare
diff --git a/prepare b/prepare
index 7ac2ad60fdd53be41bcddc29f57a197b9d250689..4c7b3abaf34d19506e61efe12d1507266999243e 100755 (executable)
--- a/prepare
+++ b/prepare
@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-#  prepare-clean
+#  prepare
 #
 #  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
 #
-#  Copyright (C) 2000 Pekka Riikonen
+#  Copyright (C) 2000 - 2001 Pekka Riikonen
 #
 #  This program is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as published by
 #
 
 echo "Preparing SILC source tree for configuration and compilation..."
+
+version=`date +%Y%m%d`
+
+# Replace version string and create configure.in
+sed -e "1,/YYYYMMDD/s//$version/" configure.in.pre >configure.in
+
 aclocal
 autoconf
 autoheader
 automake
+
+file=includes/version_internal.h
+echo "/* Automatically generated by ./prepare */" >$file
+echo "#define SILC_VERSION_STRING \"$version\"" >>$file
+echo "#define SILC_PROTOCOL_VERSION_STRING \"SILC-1.0-$version\"" >>$file
+
 echo "Done, now run ./configure and make."