Browse Source

Closes SER-177. Groups of modules in make. Make can now be called
with group_include="standard standard-dep stable experimental" or a subset
of these. Leaving out group_include results in same behavior as before,
thus this commit is backwards compatible.

Greger V. Teigre 19 years ago
parent
commit
1ec7aeb17f
2 changed files with 126 additions and 12 deletions
  1. 50 8
      INSTALL
  2. 76 4
      Makefile

+ 50 - 8
INSTALL

@@ -146,23 +146,65 @@ OS Notes:
 2. Howto Build ser From Source Distribution
 2. Howto Build ser From Source Distribution
 -------------------------------------------
 -------------------------------------------
 
 
-
 (NOTE: if make doesn't work try gmake  instead)
 (NOTE: if make doesn't work try gmake  instead)
 
 
-- compile with default options:
+SER is split in four main parts: The core, the modules, the utilties, and scripts/examples
+When you build, you can decide to build only the core, the modules, both, or all.
 
 
+Compile SER core only:
 make   #builds only ser core, equivalent to make ser
 make   #builds only ser core, equivalent to make ser
-make modules
 
 
-or make all #builds everything
+Compile modules except some explicitly excepted (see below)
+make modules  
+
+Compile all:
+make all
 
 
+Explicitly excepted modules (default in <=0.9.x):
 By default make all will not build modules that require external libraries or
 By default make all will not build modules that require external libraries or
 that are considered to be "experimental". The modules that have external
 that are considered to be "experimental". The modules that have external
-dependecies are: mysql, jabber, cpl-c, auth_radius, group_radius, uri_radius,
+dependencies are: mysql, jabber, cpl-c, auth_radius, group_radius, uri_radius,
 avp_radius, postgres, pa.
 avp_radius, postgres, pa.
-To build all of them (provided you have all the required libraries installed) 
-use:
-    make all include_modules="mysql jabber cpl-c auth_radius group_radius uri_radius avp_radius postgres pa"
+
+Including groups of modules (available in >0.9.x):
+Instead of compiling the default modules only, you can specify groups of
+modules to include, according to their status:
+standard - Modules in this group are considered a standard part of SER (due to widespread usage)
+    but they have no dependencies (note that some of these interplay with external systems.
+    However, they don't have compile or link dependencies).
+
+standard-dep -  Modules in this group are considered a standard part of SER (due to widespread usage)
+    but they have dependencies that most be satisfied for compilation.
+    NOTE! All presence modules (dialog, pa, presence_b2b, rls, xcap) have been included in this
+    group due to interdependencies
+
+stable - Modules in this group satisfy specific or niche applications, but are considered
+    stable for production use. They may or may not have dependencies
+
+experimental - Modules in this group are either not complete, untested, or without enough reports
+    of usage to allow the module into the stable group. They may or may not have dependencies.
+
+To compile core with standard modules:
+make group_include="standard" all
+
+To compile all modules (provided you have all the required libraries installed) use:
+make group_include="standard standard-dep stable experimental" all
+
+In addition to group_include (or instead), you can use 
+include_modules="modA modB"
+to specify exactly the modules you want to include, ex.
+make include_modules="mymodule" modules
+
+You can also explicitly skip modules using skip_modules. Let's say you want all the standard
+ and standard-dep modules except domain:
+make group_include="standard standard-dep" skip_modules="domain" all
+
+NOTE!!! As this mechanism is very powerful, you may be uncertain which modules wwill be included.
+Just replace all (or modules) with print-modules and you will see which modules will be included
+and excluded, ex:
+make print-modules
+will show which modules are excluded by default.
+
 If you want to install or to build a binary package (a tar.gz with ser and
 If you want to install or to build a binary package (a tar.gz with ser and
  the modules), substitute "all" in the above command with "install" or "bin".
  the modules), substitute "all" in the above command with "install" or "bin".
 
 

+ 76 - 4
Makefile

@@ -32,7 +32,10 @@
 #  2006-02-14  added utils & install-utils (andrei)
 #  2006-02-14  added utils & install-utils (andrei)
 #  2006-03-15  added nodeb parameter for make tar (andrei)
 #  2006-03-15  added nodeb parameter for make tar (andrei)
 #  2006-09-29  added modules-doc as target and doc_format= as make option (greger)
 #  2006-09-29  added modules-doc as target and doc_format= as make option (greger)
-#
+#  2006-12-09  added new group_include as make option and defined groups defining
+#		which modules to include
+#		Also added new target print-modules that you can use to check which
+#		modules will be compiled (greger)
 
 
 auto_gen=lex.yy.c cfg.tab.c #lexx, yacc etc
 auto_gen=lex.yy.c cfg.tab.c #lexx, yacc etc
 auto_gen_others=cfg.tab.h  # auto generated, non-c
 auto_gen_others=cfg.tab.h  # auto generated, non-c
@@ -52,8 +55,54 @@ skip_modules?=
 # Alternatives are txt, html, xhtml, and pdf (see Makefile.doc)
 # Alternatives are txt, html, xhtml, and pdf (see Makefile.doc)
 doc_format?=html
 doc_format?=html
 
 
-# if not set on the cmd. line or the env, exclude this modules:
-exclude_modules?= 			acc cpl ext extcmd radius_acc radius_auth vm\
+# Module group definitions, default only include the standard group
+# Make backwards compatible, don't set group_include default...
+#group_include?="standard"
+
+# Modules in this group are considered a standard part of SER (due to widespread usage)
+# but they have no dependencies (note that some of these interplay with external systems.
+# However, they don't have compile or link dependencies)
+module_group_standard=acc_syslog auth avp avpops ctl dispatcher diversion enum \
+				eval exec fifo flatstore gflags maxfwd mediaproxy \
+				nathelper options pdt permissions pike print ratelimit \
+				registrar rr sanity sl textops timer tm uac unixsock uri \
+				usrloc xlog
+
+# Modules in this group are considered a standard part of SER (due to widespread usage)
+# but they have dependencies that most be satisfied for compilation
+# acc_radius, auth_radius, avp_radius, uri_radius => radiusclient-ng
+# acc_db, auth_db, avp_db, db_ops, domain, lcr, msilo, mysql, dialog, postgres, speeddial
+# uri_db
+#      => mysql server, postgres server or other database back-end (ex. mysql-devel)
+# pa, xmlrpc => libxml2
+# rls => pa
+#
+# NOTE! All presence modules (dialog, pa, presence_b2b, rls, xcap) have been included in this
+# group due to interdependencies
+module_group_standard_dep=acc_db acc_radius auth_db auth_radius avp_db avp_radius \
+				db_ops domain lcr msilo mysql dialog pa postgres \
+				presence_b2b rls speeddial uri_db xmlrpc
+
+# Modules in this group satisfy specific or niche applications, but are considered
+# stable for production use. They may or may not have dependencies
+# cpl-c => libxml2
+# jabber => expat (library)
+# osp => OSP Toolkit (sipfoundry)
+# sms => none (external modem)
+module_group_stable=cpl-c dbtext jabber osp sms
+
+# Modules in this group are either not complete, untested, or without enough reports
+# of usage to allow the module into the stable group. They may or may not have dependencies
+module_group_experimental=tls
+
+# if not set on the cmd. line or the env, exclude the below modules.
+ifneq ($(group_include),)
+	# The defaults are modules that are obsolete.
+	exclude_modules?= 			acc cpl ext extcmd vm group mangler auth_diameter \
+						snmp im 
+else
+	# Old defaults for backwards compatibility
+	exclude_modules?= 			acc cpl ext extcmd radius_acc radius_auth vm\
 							group mangler auth_diameter \
 							group mangler auth_diameter \
 							postgres snmp \
 							postgres snmp \
 							im \
 							im \
@@ -63,12 +112,31 @@ exclude_modules?= 			acc cpl ext extcmd radius_acc radius_auth vm\
 							acc_radius dialog pa rls presence_b2b xcap xmlrpc\
 							acc_radius dialog pa rls presence_b2b xcap xmlrpc\
 							osp tls \
 							osp tls \
 							unixsock eval
 							unixsock eval
+endif
+
 # always exclude the CVS dir
 # always exclude the CVS dir
 override exclude_modules+= CVS $(skip_modules)
 override exclude_modules+= CVS $(skip_modules)
 
 
 #always include this modules
 #always include this modules
 include_modules?=
 include_modules?=
 
 
+# Test for the groups and add to include_modules
+ifneq (,$(findstring standard,$(group_include)))
+	override include_modules+= $(module_group_standard)
+endif
+
+ifneq (,$(findstring standard-dep,$(group_include)))
+	override include_modules+= $(module_group_standard_dep)
+endif
+
+ifneq (,$(findstring stable,$(group_include)))
+	override include_modules+= $(module_group_stable)
+endif
+
+ifneq (,$(findstring experimental,$(group_include)))
+	override include_modules+= $(module_group_experimental)
+endif
+
 # first 2 lines are excluded because of the experimental or incomplete
 # first 2 lines are excluded because of the experimental or incomplete
 # status of the modules
 # status of the modules
 # the rest is excluded because it depends on external libraries
 # the rest is excluded because it depends on external libraries
@@ -161,7 +229,11 @@ cfg.tab.c cfg.tab.h: cfg.y  $(ALLDEP)
 .PHONY: all
 .PHONY: all
 all: $(NAME) modules
 all: $(NAME) modules
 
 
-
+.PHONY: print-modules
+print-modules:
+	@echo The following modules will be included: $(include_modules) ; \
+	echo ---------------------------------------------------------- ; \
+	echo The following modules will be excluded: $(exclude_modules) ; \
 
 
 .PHONY: modules
 .PHONY: modules
 modules:
 modules: