Browse code

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 authored on 09/12/2006 19:41:57
Showing 2 changed files
... ...
@@ -146,23 +146,65 @@ OS Notes:
146 146
 2. Howto Build ser From Source Distribution
147 147
 -------------------------------------------
148 148
 
149
-
150 149
 (NOTE: if make doesn't work try gmake  instead)
151 150
 
152
-- compile with default options:
151
+SER is split in four main parts: The core, the modules, the utilties, and scripts/examples
152
+When you build, you can decide to build only the core, the modules, both, or all.
153 153
 
154
+Compile SER core only:
154 155
 make   #builds only ser core, equivalent to make ser
155
-make modules
156 156
 
157
-or make all #builds everything
157
+Compile modules except some explicitly excepted (see below)
158
+make modules  
159
+
160
+Compile all:
161
+make all
158 162
 
163
+Explicitly excepted modules (default in <=0.9.x):
159 164
 By default make all will not build modules that require external libraries or
160 165
 that are considered to be "experimental". The modules that have external
161
-dependecies are: mysql, jabber, cpl-c, auth_radius, group_radius, uri_radius,
166
+dependencies are: mysql, jabber, cpl-c, auth_radius, group_radius, uri_radius,
162 167
 avp_radius, postgres, pa.
163
-To build all of them (provided you have all the required libraries installed) 
164
-use:
165
-    make all include_modules="mysql jabber cpl-c auth_radius group_radius uri_radius avp_radius postgres pa"
168
+
169
+Including groups of modules (available in >0.9.x):
170
+Instead of compiling the default modules only, you can specify groups of
171
+modules to include, according to their status:
172
+standard - Modules in this group are considered a standard part of SER (due to widespread usage)
173
+    but they have no dependencies (note that some of these interplay with external systems.
174
+    However, they don't have compile or link dependencies).
175
+
176
+standard-dep -  Modules in this group are considered a standard part of SER (due to widespread usage)
177
+    but they have dependencies that most be satisfied for compilation.
178
+    NOTE! All presence modules (dialog, pa, presence_b2b, rls, xcap) have been included in this
179
+    group due to interdependencies
180
+
181
+stable - Modules in this group satisfy specific or niche applications, but are considered
182
+    stable for production use. They may or may not have dependencies
183
+
184
+experimental - Modules in this group are either not complete, untested, or without enough reports
185
+    of usage to allow the module into the stable group. They may or may not have dependencies.
186
+
187
+To compile core with standard modules:
188
+make group_include="standard" all
189
+
190
+To compile all modules (provided you have all the required libraries installed) use:
191
+make group_include="standard standard-dep stable experimental" all
192
+
193
+In addition to group_include (or instead), you can use 
194
+include_modules="modA modB"
195
+to specify exactly the modules you want to include, ex.
196
+make include_modules="mymodule" modules
197
+
198
+You can also explicitly skip modules using skip_modules. Let's say you want all the standard
199
+ and standard-dep modules except domain:
200
+make group_include="standard standard-dep" skip_modules="domain" all
201
+
202
+NOTE!!! As this mechanism is very powerful, you may be uncertain which modules wwill be included.
203
+Just replace all (or modules) with print-modules and you will see which modules will be included
204
+and excluded, ex:
205
+make print-modules
206
+will show which modules are excluded by default.
207
+
166 208
 If you want to install or to build a binary package (a tar.gz with ser and
167 209
  the modules), substitute "all" in the above command with "install" or "bin".
168 210
 
... ...
@@ -32,7 +32,10 @@
32 32
 #  2006-02-14  added utils & install-utils (andrei)
33 33
 #  2006-03-15  added nodeb parameter for make tar (andrei)
34 34
 #  2006-09-29  added modules-doc as target and doc_format= as make option (greger)
35
-#
35
+#  2006-12-09  added new group_include as make option and defined groups defining
36
+#		which modules to include
37
+#		Also added new target print-modules that you can use to check which
38
+#		modules will be compiled (greger)
36 39
 
37 40
 auto_gen=lex.yy.c cfg.tab.c #lexx, yacc etc
38 41
 auto_gen_others=cfg.tab.h  # auto generated, non-c
... ...
@@ -52,8 +55,54 @@ skip_modules?=
52 52
 # Alternatives are txt, html, xhtml, and pdf (see Makefile.doc)
53 53
 doc_format?=html
54 54
 
55
-# if not set on the cmd. line or the env, exclude this modules:
56
-exclude_modules?= 			acc cpl ext extcmd radius_acc radius_auth vm\
55
+# Module group definitions, default only include the standard group
56
+# Make backwards compatible, don't set group_include default...
57
+#group_include?="standard"
58
+
59
+# Modules in this group are considered a standard part of SER (due to widespread usage)
60
+# but they have no dependencies (note that some of these interplay with external systems.
61
+# However, they don't have compile or link dependencies)
62
+module_group_standard=acc_syslog auth avp avpops ctl dispatcher diversion enum \
63
+				eval exec fifo flatstore gflags maxfwd mediaproxy \
64
+				nathelper options pdt permissions pike print ratelimit \
65
+				registrar rr sanity sl textops timer tm uac unixsock uri \
66
+				usrloc xlog
67
+
68
+# Modules in this group are considered a standard part of SER (due to widespread usage)
69
+# but they have dependencies that most be satisfied for compilation
70
+# acc_radius, auth_radius, avp_radius, uri_radius => radiusclient-ng
71
+# acc_db, auth_db, avp_db, db_ops, domain, lcr, msilo, mysql, dialog, postgres, speeddial
72
+# uri_db
73
+#      => mysql server, postgres server or other database back-end (ex. mysql-devel)
74
+# pa, xmlrpc => libxml2
75
+# rls => pa
76
+#
77
+# NOTE! All presence modules (dialog, pa, presence_b2b, rls, xcap) have been included in this
78
+# group due to interdependencies
79
+module_group_standard_dep=acc_db acc_radius auth_db auth_radius avp_db avp_radius \
80
+				db_ops domain lcr msilo mysql dialog pa postgres \
81
+				presence_b2b rls speeddial uri_db xmlrpc
82
+
83
+# Modules in this group satisfy specific or niche applications, but are considered
84
+# stable for production use. They may or may not have dependencies
85
+# cpl-c => libxml2
86
+# jabber => expat (library)
87
+# osp => OSP Toolkit (sipfoundry)
88
+# sms => none (external modem)
89
+module_group_stable=cpl-c dbtext jabber osp sms
90
+
91
+# Modules in this group are either not complete, untested, or without enough reports
92
+# of usage to allow the module into the stable group. They may or may not have dependencies
93
+module_group_experimental=tls
94
+
95
+# if not set on the cmd. line or the env, exclude the below modules.
96
+ifneq ($(group_include),)
97
+	# The defaults are modules that are obsolete.
98
+	exclude_modules?= 			acc cpl ext extcmd vm group mangler auth_diameter \
99
+						snmp im 
100
+else
101
+	# Old defaults for backwards compatibility
102
+	exclude_modules?= 			acc cpl ext extcmd radius_acc radius_auth vm\
57 103
 							group mangler auth_diameter \
58 104
 							postgres snmp \
59 105
 							im \
... ...
@@ -63,12 +112,31 @@ exclude_modules?= 			acc cpl ext extcmd radius_acc radius_auth vm\
63 63
 							acc_radius dialog pa rls presence_b2b xcap xmlrpc\
64 64
 							osp tls \
65 65
 							unixsock eval
66
+endif
67
+
66 68
 # always exclude the CVS dir
67 69
 override exclude_modules+= CVS $(skip_modules)
68 70
 
69 71
 #always include this modules
70 72
 include_modules?=
71 73
 
74
+# Test for the groups and add to include_modules
75
+ifneq (,$(findstring standard,$(group_include)))
76
+	override include_modules+= $(module_group_standard)
77
+endif
78
+
79
+ifneq (,$(findstring standard-dep,$(group_include)))
80
+	override include_modules+= $(module_group_standard_dep)
81
+endif
82
+
83
+ifneq (,$(findstring stable,$(group_include)))
84
+	override include_modules+= $(module_group_stable)
85
+endif
86
+
87
+ifneq (,$(findstring experimental,$(group_include)))
88
+	override include_modules+= $(module_group_experimental)
89
+endif
90
+
72 91
 # first 2 lines are excluded because of the experimental or incomplete
73 92
 # status of the modules
74 93
 # the rest is excluded because it depends on external libraries
... ...
@@ -161,7 +229,11 @@ cfg.tab.c cfg.tab.h: cfg.y  $(ALLDEP)
161 161
 .PHONY: all
162 162
 all: $(NAME) modules
163 163
 
164
-
164
+.PHONY: print-modules
165
+print-modules:
166
+	@echo The following modules will be included: $(include_modules) ; \
167
+	echo ---------------------------------------------------------- ; \
168
+	echo The following modules will be excluded: $(exclude_modules) ; \
165 169
 
166 170
 .PHONY: modules
167 171
 modules: