+Thu May 31 13:57:33 CEST 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+ * Added new distribution feature, DISTLABEL. Every distribution
+ can define own preprocessor label that can be used in the
+ source code. For example: #ifdef SILC_DIST_CLIENT. Affected
+ file distributions, acconfig.h.pre and prepare.
+
Tue May 29 22:16:40 EEST 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
* Added Makefile.defines_int to include the actual definitions
#undef Rdup2
#undef Rfclose
#undef Rgethostbyname
+
+/* SILC distribution definitions (leave this at the end of file) */
AC_PROG_LN_S
AC_SUBST(LN_S)
+# Distribution definition. ./prepare will automatically add here a correct
+# value. Do not edit!
+AC_DEFINE(SILC_DIST_DEFINE)
+AM_CONDITIONAL(SILC_DIST_DEFINE, test xtrue = xtrue)
+
# XXX
# Compiler flags
if test "$GCC"; then
#
# _<name>_SUBDIRS Subdirs for the distribution
# _<name>_SUBIDRS_<dir> Subdirs under <dir>
+# _<name>_DISTLABEL Preprocessor label
+#
+# The _SUBDIRS define all the subdirectories that the Makefile should
+# traverse. The _SUBDIRS_<dir> defines a subdirectories in the
+# subdirectory <dir>. The _DISTLABEL defines a preprocessor label
+# that can be used in the source code like `#ifdef SILC_DIST_CLIENT' to
+# define code only for the specific distribution. The label can also be
+# used in the Makefiles by `if SILC_DIST_CLIENT' to define something in
+# the Makefile only for the specific distribution.
+#
#
# NOTE: For now this supports only one sublevel of the directories.
# Also make sure that the <dir> directory includes Makefile.am.pre
#
# _xyz_SUBDIRS=lib irssi doc includes
# _xyz_SUBDIRS_lib=$(SUBDIRS)
+# _xyz_DISTLABEL=SILC_DIST_XYZ
#
# To prepare the distribution give command ./prepare xyz 1.0.4
#
_toolkit_SUBDIRS=lib irssi silc silcd doc includes
_toolkit_SUBDIRS_lib=$(SUBDIRS)
+_toolkit_DISTLABEL=SILC_DIST_TOOLKIT
_client_SUBDIRS=lib irssi doc includes
_client_SUBDIRS_lib=$(SUBDIRS)
+_client_DISTLABEL=SILC_DIST_CLIENT
_server_SUBDIRS=lib silcd doc includes
_server_SUBDIRS_lib=contrib silccore silccrypt silcsim silcmath silcske silcutil trq dotconf
+_server_DISTLABEL=SILC_DIST_SERVER
+
echo "Preparing $distribution distribution version $version"
+#
# Go though the subdirs and create the Makefile.ams from the
-# Makefile.am.pre files.
-
+# Makefile.am.pre files. Create also the acconfig.h for the distribution.
+#
subdirs=`grep _"$distribution"_SUBDIRS= distributions |cut -d= -f2`
sed -e "/SILC_DISTRIBUTION_SUBDIRS/s//$subdirs/" Makefile.am.pre >Makefile.am
path=`pwd`
done
cd $path
-# Replace version string and create configure.in
+distlabel=`grep _"$distribution"_DISTLABEL= distributions |cut -d= -f2`
+cp acconfig.h.pre acconfig.h
+echo "#undef $distlabel" >>acconfig.h
+
+
+#
+# Replace version string, package name and distribution infos, and create
+# the actual configure.in
+#
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
+sed -e "/SILC_PACKAGE/s//silc-"$distribution"/" configure.in2 >configure.in3
+sed -e "/SILC_DIST_DEFINE/s//$distlabel/" configure.in3 >configure.in4
+sed -e "/SILC_DIST_DEFINE/s//$distlabel/" configure.in4 >configure.in
+rm -f configure.in2 configure.in3 configure.in4
+
#
# Prepare the Makefile.defines
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
+echo "#define SILC_NAME \"SILC $distribution\"" >>$file
+
# preparing irssi
cd irssi
rm -f Makefile.defines.in
rm -f Makefile.defines_int
rm -f Makefile.defines_int.in
+rm -f acconfig.h
rm -f irssi/Makefile.defines
rm -f irssi/Makefile.defines.in
rm -f irssi/Makefile.defines_int