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 55
 # Alternatives are txt, html, xhtml, and pdf (see Makefile.doc)
53 56
 doc_format?=html
54 57
 
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\
58
+# Module group definitions, default only include the standard group
59
+# Make backwards compatible, don't set group_include default...
60
+#group_include?="standard"
61
+
62
+# Modules in this group are considered a standard part of SER (due to widespread usage)
63
+# but they have no dependencies (note that some of these interplay with external systems.
64
+# However, they don't have compile or link dependencies)
65
+module_group_standard=acc_syslog auth avp avpops ctl dispatcher diversion enum \
66
+				eval exec fifo flatstore gflags maxfwd mediaproxy \
67
+				nathelper options pdt permissions pike print ratelimit \
68
+				registrar rr sanity sl textops timer tm uac unixsock uri \
69
+				usrloc xlog
70
+
71
+# Modules in this group are considered a standard part of SER (due to widespread usage)
72
+# but they have dependencies that most be satisfied for compilation
73
+# acc_radius, auth_radius, avp_radius, uri_radius => radiusclient-ng
74
+# acc_db, auth_db, avp_db, db_ops, domain, lcr, msilo, mysql, dialog, postgres, speeddial
75
+# uri_db
76
+#      => mysql server, postgres server or other database back-end (ex. mysql-devel)
77
+# pa, xmlrpc => libxml2
78
+# rls => pa
79
+#
80
+# NOTE! All presence modules (dialog, pa, presence_b2b, rls, xcap) have been included in this
81
+# group due to interdependencies
82
+module_group_standard_dep=acc_db acc_radius auth_db auth_radius avp_db avp_radius \
83
+				db_ops domain lcr msilo mysql dialog pa postgres \
84
+				presence_b2b rls speeddial uri_db xmlrpc
85
+
86
+# Modules in this group satisfy specific or niche applications, but are considered
87
+# stable for production use. They may or may not have dependencies
88
+# cpl-c => libxml2
89
+# jabber => expat (library)
90
+# osp => OSP Toolkit (sipfoundry)
91
+# sms => none (external modem)
92
+module_group_stable=cpl-c dbtext jabber osp sms
93
+
94
+# Modules in this group are either not complete, untested, or without enough reports
95
+# of usage to allow the module into the stable group. They may or may not have dependencies
96
+module_group_experimental=tls
97
+
98
+# if not set on the cmd. line or the env, exclude the below modules.
99
+ifneq ($(group_include),)
100
+	# The defaults are modules that are obsolete.
101
+	exclude_modules?= 			acc cpl ext extcmd vm group mangler auth_diameter \
102
+						snmp im 
103
+else
104
+	# Old defaults for backwards compatibility
105
+	exclude_modules?= 			acc cpl ext extcmd radius_acc radius_auth vm\
57 106
 							group mangler auth_diameter \
58 107
 							postgres snmp \
59 108
 							im \
... ...
@@ -63,12 +112,31 @@ exclude_modules?= 			acc cpl ext extcmd radius_acc radius_auth vm\
63 112
 							acc_radius dialog pa rls presence_b2b xcap xmlrpc\
64 113
 							osp tls \
65 114
 							unixsock eval
115
+endif
116
+
66 117
 # always exclude the CVS dir
67 118
 override exclude_modules+= CVS $(skip_modules)
68 119
 
69 120
 #always include this modules
70 121
 include_modules?=
71 122
 
123
+# Test for the groups and add to include_modules
124
+ifneq (,$(findstring standard,$(group_include)))
125
+	override include_modules+= $(module_group_standard)
126
+endif
127
+
128
+ifneq (,$(findstring standard-dep,$(group_include)))
129
+	override include_modules+= $(module_group_standard_dep)
130
+endif
131
+
132
+ifneq (,$(findstring stable,$(group_include)))
133
+	override include_modules+= $(module_group_stable)
134
+endif
135
+
136
+ifneq (,$(findstring experimental,$(group_include)))
137
+	override include_modules+= $(module_group_experimental)
138
+endif
139
+
72 140
 # first 2 lines are excluded because of the experimental or incomplete
73 141
 # status of the modules
74 142
 # the rest is excluded because it depends on external libraries
... ...
@@ -161,7 +229,11 @@ cfg.tab.c cfg.tab.h: cfg.y  $(ALLDEP)
161 229
 .PHONY: all
162 230
 all: $(NAME) modules
163 231
 
164
-
232
+.PHONY: print-modules
233
+print-modules:
234
+	@echo The following modules will be included: $(include_modules) ; \
235
+	echo ---------------------------------------------------------- ; \
236
+	echo The following modules will be excluded: $(exclude_modules) ; \
165 237
 
166 238
 .PHONY: modules
167 239
 modules: