updates
[silc.git] / prepare
diff --git a/prepare b/prepare
index 8719ff7abe39415ac806aacd685dd76aab4c2124..3a0829de505fba91c8bc78901281e8d8518ee371 100755 (executable)
--- a/prepare
+++ b/prepare
@@ -1,4 +1,4 @@
-#!/bin/sh
+#! /bin/sh
 #
 #  prepare
 #
@@ -30,7 +30,7 @@
 #
 # If <package version> is omitted <base version> is used as package
 # version.  The package version appears in the package name and in those
-# distributions that used the SILC_DISTRIBUTION_VERSION define in the
+# distributions that used the SILC_DIST_VERSION_STRING define in the
 # code.  The base version is the SILC_VERSION_STRING define.
 #
 
@@ -84,10 +84,19 @@ done
 cd $path
 
 # Replace version string and create configure.in
-sed -e "/SILC_VERSION/s//$version/" configure.in.pre >configure.in2
+echo "# Automatically generated by ./prepare from configure.in.pre. Do not edit!" >configure.in2
+sed -e "/SILC_VERSION/s//$dist_version/" configure.in.pre >>configure.in2
 sed -e "/SILC_PACKAGE/s//silc-"$distribution"/" configure.in2 >configure.in
 rm -f configure.in2
 
+#
+# Prepare the Makefile.defines
+#
+cp Makefile.defines.pre Makefile.defines.in
+cp Makefile.defines.in irssi
+cp Makefile.defines_int.pre Makefile.defines_int.in
+cp Makefile.defines_int.in irssi
+
 aclocal
 autoconf
 autoheader
@@ -103,6 +112,7 @@ cd ../..
 file=includes/version_internal.h
 echo "/* Automatically generated by ./prepare */" >$file
 echo "#define SILC_VERSION_STRING \"$version\"" >>$file
+echo "#define SILC_DIST_VERSION_STRING \"$dist_version\"" >>$file
 echo "#define SILC_PROTOCOL_VERSION_STRING \"SILC-1.0-$version\"" >>$file
 
 # preparing irssi
@@ -112,7 +122,7 @@ cd ..
 file=irssi/irssi-version.h.in
 version_date=`date +%Y%m%d`
 echo "/* automatically created by autogen.sh */" > $file
-echo "#define IRSSI_VERSION \"$version (Irssi base: @VERSION@ - SILC base: SILC Toolkit $version)\"" >> $file
+echo "#define IRSSI_VERSION \"$dist_version (Irssi base: @VERSION@ - SILC base: SILC Toolkit $version)\"" >>$file
 echo "#define IRSSI_VERSION_DATE \"$version_date\"" >> $file
 
 echo "Done, now run ./configure and make."