updates.
authorPekka Riikonen <priikone@silcnet.org>
Mon, 28 May 2001 08:26:26 +0000 (08:26 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Mon, 28 May 2001 08:26:26 +0000 (08:26 +0000)
CHANGES
configure.in.pre
prepare

diff --git a/CHANGES b/CHANGES
index 70c4c1e53e7b909217cf6a8ce59ac54a83b6d4e2..33c0fff8eeb5720024b42c141905cdd3d39bb120 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+Mon May 28 10:30:51 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+       * Minor changes to the ./prepare script to change the package
+         name according the distribution name to the configure.in.
+
 Sun May 27 22:24:57 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
 
        * Created new distribution system.  Added file `distributions'
index 2af2d3fe008db21e5c3c8729d7674976377e1308..db51c3c74f77ca85013fa1051bcdf935093829dd 100644 (file)
@@ -34,7 +34,7 @@ case "$target" in
 esac
 
 # ./prepare script will automatically put the correct version. Do not edit!
-AM_INIT_AUTOMAKE(silc, SILC_VERSION)
+AM_INIT_AUTOMAKE(SILC_PACKAGE, SILC_VERSION)
 AC_PREREQ(2.3)
 AM_CONFIG_HEADER(includes/silcdefs.h)
 
diff --git a/prepare b/prepare
index 740cbc943f01d82a093a6d1e2cca21e69be4ffbf..8719ff7abe39415ac806aacd685dd76aab4c2124 100755 (executable)
--- a/prepare
+++ b/prepare
 # temporary files (including these prepare* scripts) are removed.
 #
 
+#
+# Usage: ./prepare [<distribution> <base version> <package version>]
+#
+# 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
+# code.  The base version is the SILC_VERSION_STRING define.
+#
+
 #
 # SILC Distribution versions. Set here or give the version on the command
-# line, as argument.
+# line as argument.
 #
 SILC_VERSION=0.2.6                     # Base version
 
@@ -46,6 +55,11 @@ if test "$version" = ""; then
   version=$SILC_VERSION;
 fi
 
+dist_version=$3
+if test "$dist_version" = ""; then
+  dist_version=$version
+fi
+
 echo "Preparing $distribution distribution version $version"
 
 # Go though the subdirs and create the Makefile.ams from the
@@ -62,13 +76,17 @@ do
     cd $path
     continue;
   fi
-  sed -e "/SILC_DISTRIBUTION_SUBDIRS/s//$sub/" Makefile.am.pre >Makefile.am 2>/dev/null
+  if [ -f Makefile.am.pre ]; then
+    sed -e "/SILC_DISTRIBUTION_SUBDIRS/s//$sub/" Makefile.am.pre >Makefile.am 2>/dev/null
+  fi
   cd $path
 done
 cd $path
 
 # Replace version string and create configure.in
-sed -e "/SILC_VERSION/s//$version/" configure.in.pre >configure.in
+sed -e "/SILC_VERSION/s//$version/" configure.in.pre >configure.in2
+sed -e "/SILC_PACKAGE/s//silc-"$distribution"/" configure.in2 >configure.in
+rm -f configure.in2
 
 aclocal
 autoconf