I'm cleaning up some minor debris from splitting sipXrls, sipXpark, and
sipXpresence as separate components, and I ran across a few places where
sipXvxml was still listed as a component, despite having been deleted a
week or two ago.

It struck me that a better solution than the current situation of
maintaining several lists of the components of sipXecs would be to have
a single program or value that lists them all.

This led me to define "sipxecs-components", which is a script that you
run to get a list of all the components of sipXecs.  This requires
changing half a dozen files a little bit, but after you get it set up,
$( sipxecs-components ) will give you the list of components based on
the top-level configure.ac, which has to be right in order for the build
to work.

I've attached the diffs for this change so you can have a look at it.
Any comments?

Dale

Index: configure.ac
===================================================================
--- configure.ac	(revision 16719)
+++ configure.ac	(working copy)
@@ -66,7 +66,13 @@
 
 SFAC_DIST_DIR
 
-AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([top.mak])
+# sipXecs/bin/sipxecs-components is specified here because it needs to
+# have @subdirs@ substituted, and @subdirs@ is loaded by AC_CONFIG_SUBDIRS,
+# which is done only in this configure.ac.
+AC_CONFIG_FILES([
+	Makefile
+	top.mak
+	sipXecs/bin/sipxecs-components
+])
 
 AC_OUTPUT
Index: sipXecs/configure.ac
===================================================================
--- sipXecs/configure.ac	(revision 16707)
+++ sipXecs/configure.ac	(working copy)
@@ -12,6 +12,7 @@
 
 AC_CONFIG_FILES([
     Makefile
+    bin/Makefile
 ])
 
 AC_OUTPUT

Property changes on: sipXecs/bin
___________________________________________________________________
Name: svn:ignore
   + Makefile.in


Index: sipXecs/bin/sipxecs-components.in
===================================================================
--- sipXecs/bin/sipxecs-components.in	(revision 0)
+++ sipXecs/bin/sipxecs-components.in	(revision 0)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Output names all sipXecs components, using their directory (mixed-case)
+# names, one per line.
+
+# This script is modified by the top-level configure.ac, because it has
+# access to the list of all the components, @subd...@.
+
+for C in @subdirs@
+do
+    echo $C
+done
+
Index: sipXecs/bin/Makefile.am
===================================================================
--- sipXecs/bin/Makefile.am	(revision 0)
+++ sipXecs/bin/Makefile.am	(revision 0)
@@ -0,0 +1,12 @@
+include $(top_srcdir)/config/subdir.am
+
+bin_SCRIPTS = \
+   sipxecs-components
+
+EXTRA_DIST = \
+    $(bin_SCRIPTS) \
+    sipxecs-components.in
+
+install-exec-hook :
+
+DISTCLEANFILES = Makefile.in config.h.in

Property changes on: sipXecs/bin/Makefile.am
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Index: sipXecs/Makefile.am
===================================================================
--- sipXecs/Makefile.am	(revision 16707)
+++ sipXecs/Makefile.am	(working copy)
@@ -2,6 +2,10 @@
 
 RPMS = $(DEFAULT_RPMS)
 
+SUBDIRS = \
+	. \
+	bin
+
 EXTRA_DIST = \
 	BUILDSTAMP \
 	SVN-VERSION \
Index: sipXportLib/bin/sipx-config
===================================================================
--- sipXportLib/bin/sipx-config	(revision 16707)
+++ sipXportLib/bin/sipx-config	(working copy)
@@ -6,7 +6,7 @@
 
 # DEVELOPER NOTE: This is not meant to replace autoconf
 # macros. Instead this is to find programs (like java) that can differ
-# then what is used to compile then what is used to run.  This
+# from what is used to compile then what is used to run.  This
 # difference is extremely important when building binary distributions
 # like RPMs
 
@@ -31,27 +31,6 @@
 # true, I suggest parameter-izing this
 JavaVersions="1\.[456]"
 
-# List of all sipx projects
-Projects="\
-  sipxportlib \
-  sipxtacklib \
-  sipxmedialib \
-  sipxcalllib \
-  sipxcommserverlib \
-  sipxregistry \
-  sipxpublisher \
-  sipxproxy \
-  sipxconfig \
-  sipxfreeswitch \
-  sipxvxml \
-  sipxacd \
-  sipxpbx \
-  sipxsaa \
-  sipxpark \
-  sipxivr \
-  sipxpage \
-  sipxpresence"
-
 ## Test the java executable command
 testJavaTool()
 {
@@ -140,7 +119,9 @@
 elif test "$Action" = "VERSION"
 then
     echo "sipX version information:"
-    for Project in $Projects; do
+    for Project in $( ${MyDir}/sipxecs-components |
+	              sed -e 's/sipX/sipx/' |
+		      sort ) ; do
         echo -n "  $Project "
         # Test if the script was installed
         if ${MyDir}/${Project}-config >/dev/null 2>&1
_______________________________________________
sipx-dev mailing list [email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
sipXecs IP PBX -- http://www.sipfoundry.org/

Reply via email to