From f9c7fab1034d0457ef487e766990076561503e21 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Tue, 5 Jun 2001 11:17:54 +0000 Subject: [PATCH] updates. --- distributions | 4 ++++ lib/Makefile.am.pre | 14 ++++++++++---- prepare | 35 +++++++++++++++++++++++++---------- 3 files changed, 39 insertions(+), 14 deletions(-) diff --git a/distributions b/distributions index 400664bd..6da1b27f 100644 --- a/distributions +++ b/distributions @@ -15,6 +15,8 @@ # __SUBDIRS_ Subdirs under # __DISTLABEL Preprocessor label # +# DISTRBUTIONS= +# # The _SUBDIRS define all the subdirectories that the Makefile should # traverse. The _SUBDIRS_ defines all subdirectories in the # subdirectory . The _DISTLABEL defines a preprocessor label @@ -23,6 +25,7 @@ # used in the Makefiles by `if SILC_DIST_CLIENT' to define something in # the Makefile only for the specific distribution. # +# The DISTRIBUTIONS defines all distributions in this file. # # NOTE: For now this supports only one sublevel of the directories. # Also make sure that the directory includes Makefile.am.pre @@ -55,3 +58,4 @@ _server_SUBDIRS=lib silcd doc includes _server_SUBDIRS_lib=contrib silccore silccrypt silcsim silcmath silcske silcutil trq dotconf _server_DISTLABEL=SILC_DIST_SERVER +DISTRIBUTIONS=toolkit client server diff --git a/lib/Makefile.am.pre b/lib/Makefile.am.pre index 1978d221..107912a8 100644 --- a/lib/Makefile.am.pre +++ b/lib/Makefile.am.pre @@ -18,7 +18,7 @@ AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign -SUBDIRS = \ +COMMONDIRS = \ contrib \ silccore \ silccrypt \ @@ -26,10 +26,16 @@ SUBDIRS = \ silcmath \ silcske \ silcutil \ - silcclient \ - trq \ - dotconf + dotconf \ + trq # zlib + +if SILC_DIST_CLIENT +SUBDIRS = $(COMMONDIRS) silcclient +else +SUBDIRS = $(COMMONDIRS) +endif + DIST_SUBDIRS = SILC_DISTRIBUTION_SUBDIRS # SILC Library dirs diff --git a/prepare b/prepare index cc6f6d77..2a749e6e 100755 --- a/prepare +++ b/prepare @@ -64,7 +64,7 @@ echo "Preparing $distribution distribution version $version" # # Go though the subdirs and create the Makefile.ams from the -# Makefile.am.pre files. Create also the acconfig.h for the distribution. +# Makefile.am.pre files. # subdirs=`grep _"$distribution"_SUBDIRS= distributions |cut -d= -f2` sed -e "/SILC_DISTRIBUTION_SUBDIRS/s//$subdirs/" Makefile.am.pre >Makefile.am @@ -84,21 +84,36 @@ do done cd $path -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.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 +sed -e "/SILC_VERSION/s//$dist_version/" -e "/SILC_PACKAGE/s//silc-"$distribution"/" configure.in.pre >>configure.in2 + +# +# Create also the acconfig.h for the distribution. Note that this sets +# also dist labels for distributions that are not defined. +# +cp acconfig.h.pre acconfig.h +dists=`grep DISTRIBUTIONS= distributions |cut -d= -f2` +touch am_cond +for i in $dists +do + 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 + else + echo "AM_CONDITIONAL($dl, test xtrue = xfalse)" >>am_cond + fi +done + +sed '/SILC_DIST_DEFINE/ r am_cond' configure.in2 >configure.in3 +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 # -- 2.43.0