Imported robodoc
[silc.git] / prepare
diff --git a/prepare b/prepare
index 2a749e6e8dbbeb9effb02b7c5a0b97994257838a..b00d1778947ee621cdd1e720a8b917561cb58f28 100755 (executable)
--- a/prepare
+++ b/prepare
@@ -38,7 +38,7 @@
 # SILC Distribution versions. Set here or give the version on the command
 # line as argument.
 #
-SILC_VERSION=0.2.6                     # Base version
+SILC_VERSION=0.5.1                     # Base version
 
 
 #############################################################################
@@ -66,19 +66,20 @@ echo "Preparing $distribution distribution version $version"
 # Go though the subdirs and create the Makefile.ams from the
 # Makefile.am.pre files.
 #
-subdirs=`grep _"$distribution"_SUBDIRS= distributions |cut -d=  -f2`
-sed -e "/SILC_DISTRIBUTION_SUBDIRS/s//$subdirs/" Makefile.am.pre >Makefile.am
+subdirs=`grep "$distribution"_SUBDIRS= distributions |cut -d=  -f2`
+ed=`grep "$distribution"_EXTRA_DIST= distributions |cut -d=  -f2`
+sed -e "/SILC_DISTRIBUTION_SUBDIRS/s//$subdirs/" -e "/SILC_DISTRIBUTION_EXTRA/s//$ed/" Makefile.am.pre >Makefile.am
 path=`pwd`
 for i in $subdirs
 do
   cd $i
-  sub=`grep _"$distribution"_SUBDIRS_"$i"= $path/distributions |cut -d=  -f2`
+  sub=`grep "$distribution"_SUBDIRS_"$i"= $path/distributions |cut -d=  -f2`
   if test "$sub" = ""; then
     cd $path
     continue;
   fi
   if [ -f Makefile.am.pre ]; then
-    sed -e "/SILC_DISTRIBUTION_SUBDIRS/s//$sub/" Makefile.am.pre >Makefile.am 2>/dev/null
+    sed -e "/SILC_DISTRIBUTION_SUBDIRS/s//$sub/" -e "/SILC_DISTRIBUTION_SUBDIRS/s//$sub/" Makefile.am.pre >Makefile.am 2>/dev/null
   fi
   cd $path
 done
@@ -101,7 +102,7 @@ dists=`grep DISTRIBUTIONS= distributions |cut -d=  -f2`
 touch am_cond
 for i in $dists
 do
-  dl=`grep _"$i"_DISTLABEL= distributions |cut -d=  -f2`
+  dl=`grep "$i"_DISTLABEL= distributions |cut -d=  -f2`
   echo "#undef $dl" >>acconfig.h
   if test "$i" = "$distribution"; then
     echo "AM_CONDITIONAL($dl, test xtrue = xtrue)" >>am_cond
@@ -111,7 +112,7 @@ do
 done
 
 sed '/SILC_DIST_DEFINE/ r am_cond' configure.in2 >configure.in3
-dl=`grep _"$distribution"_DISTLABEL= distributions |cut -d=  -f2`
+dl=`grep "$distribution"_DISTLABEL= distributions |cut -d=  -f2`
 sed -e "/SILC_DIST_DEFINE/s//$dl/" configure.in3 >configure.in
 rm -f configure.in2 configure.in3 am_cond
 
@@ -120,9 +121,11 @@ rm -f configure.in2 configure.in3 am_cond
 # 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.in irssi
 cp Makefile.defines_int.in irssi
+cp Makefile.defines.in lib/silcmath/mpi
+cp Makefile.defines_int.in lib/silcmath/mpi
 
 aclocal
 autoconf
@@ -136,6 +139,13 @@ autoheader
 automake >/dev/null 2>/dev/null
 cd ../..
 
+cd lib/silcmath/mpi
+aclocal
+autoconf
+autoheader
+automake >/dev/null 2>/dev/null
+cd ../../..
+
 file=includes/version_internal.h
 echo "/* Automatically generated by ./prepare */" >$file
 echo "#define SILC_VERSION_STRING \"$version\"" >>$file
@@ -143,7 +153,6 @@ echo "#define SILC_DIST_VERSION_STRING \"$dist_version\"" >>$file
 echo "#define SILC_PROTOCOL_VERSION_STRING \"SILC-1.0-$version\"" >>$file
 echo "#define SILC_NAME \"SILC $distribution\"" >>$file
 
-
 # preparing irssi
 cd irssi
 sh autogen.sh 2>/dev/null 1>/dev/null