+Sun May 27 22:24:57 EEST 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+ * Created new distribution system. Added file `distributions'
+ that defines all the distributions that can be created out of
+ the SILC source tree. The ./prepare script now reads that
+ file to determine how to prepare the distributions. The
+ first argument to the ./prepare is the name of the distribution
+ and second is the version of the distribution. If given
+ without arguments it creates the default (toolkit) distribution
+ with the default version (defined in ./prepare).
+
+ All Makefile.am files that are subject to the distributions
+ are now named as Makefile.am.pre. These are ./Makefile.am
+ and lib/Makefile.am. Others may be changed later.
+
Sun May 27 15:57:17 EEST 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
* Added invite list, ban list, some key management and connection
AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
SUBDIRS = lib silc silcd doc includes
+DIST_SUBDIRS = SILC_DISTRIBUTION_SUBDIRS
dist-bzip: distdir
-chmod -R a+r $(distdir)
--- /dev/null
+#
+# Distributions
+#
+# Distributions file describing the different distributions that are
+# created out of the SILC source tree. The ./prepare script will read
+# this file to determine what kind of distributions are created.
+#
+# Give the name of the distribution and the version as arguments to the
+# ./prepare script to prepare the source tree for the specific
+# distribution.
+#
+# The format of this file is as follows:
+#
+# _<name>_SUBDIRS Subdirs for the distribution
+# _<name>_SUBIDRS_<dir> Subdirs under <dir>
+#
+# NOTE: For now this supports only one sublevel of the directories.
+# Also make sure that the <dir> directory includes Makefile.am.pre
+# instead of Makefile.am, otherwise it won't work. The Makefile.am.pre
+# must have DIST_SUBDIRS = SILC_DISTRIBUTIONS_SUBDIRS line in it.
+#
+# NOTE: Also note that if any subdirectory has Makefile.am.pre then you
+# must list it here as _<name>_SUBDIRS_<dir> and either define the
+# directories one by one or use $(SUBDIRS) to use default to that
+# Makefile. Otherwise, ./prepare cannot create correct Makefile.am.
+#
+# Example:
+#
+# _xyz_SUBDIRS=lib irssi doc includes
+# _xyz_SUBDIRS_lib=$(SUBDIRS)
+#
+# To prepare the distribution give command ./prepare xyz 1.0.4
+#
+
+_toolkit_SUBDIRS=lib silc silcd doc includes
+_toolkit_SUBDIRS_lib=$(SUBDIRS)
+
+_client_SUBDIRS=lib irssi doc includes
+_client_SUBDIRS_lib=$(SUBDIRS)
+
+_server_SUBDIRS=lib silcd doc includes
+_server_SUBDIRS_lib=contrib silccore silccrypt silcsim silcmath silcske silcutil trq dotconf
trq \
dotconf
# zlib
+DIST_SUBDIRS = SILC_DISTRIBUTION_SUBDIRS
# SILC Library dirs
SILCLIB_DIRS = \
# temporary files (including these prepare* scripts) are removed.
#
-SILC_VERSION=0.2.6
+#
+# SILC Distribution versions. Set here or give the version on the command
+# line, as argument.
+#
+SILC_VERSION=0.2.6 # Base version
+
+
+#############################################################################
+
+echo "Preparing SILC source tree for configuration and compilation..."
-version=$1
+distribution=$1
+if test "$distribution" = ""; then
+ distribution="toolkit";
+fi
+
+version=$2
if test "$version" = ""; then
version=$SILC_VERSION;
fi
-echo "Preparing SILC source tree for configuration and compilation..."
+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
+path=`pwd`
+for i in $subdirs
+do
+ cd $i
+ sub=`grep _"$distribution"_SUBDIRS_"$i"= $path/distributions |cut -d= -f2`
+ if test "$sub" = ""; then
+ cd $path
+ continue;
+ fi
+ sed -e "/SILC_DISTRIBUTION_SUBDIRS/s//$sub/" Makefile.am.pre >Makefile.am 2>/dev/null
+ cd $path
+done
+cd $path
# Replace version string and create configure.in
sed -e "/SILC_VERSION/s//$version/" configure.in.pre >configure.in
echo "All errors and warnings may be safely ignored."
make clean -k
make distclean -k
+rm -f Makefile.am
+rm -f lib/Makefile.am
rm -f configure.in
rm -f includes/stamp-*
rm -f includes/silcconfig.*