Browse code

Added three new group_include target groups: mysql, radius, presence. You can now build a standard ser with mysql using: make group_include="standard mysql" all

Fixed a problem in the exclude/include logic when using group_include. The
result is now as expected.

Improved the output in print-modules target to show the actual resultant set
of modules that will be made in addition to the include and exclude modules lists.

Greger V. Teigre authored on 10/01/2007 10:34:59
Showing 2 changed files
... ...
@@ -190,6 +190,17 @@ make group_include="standard" all
190 190
 To compile all modules (provided you have all the required libraries installed) use:
191 191
 make group_include="standard standard-dep stable experimental" all
192 192
 
193
+There are also in addition some "convenience" groups:
194
+
195
+mysql - Include all modules dependent on mysql
196
+
197
+radius - Include all modules on radiusclient
198
+
199
+presence - Include all the presence modules
200
+
201
+Ex. to make a standard installation with mysql, use:
202
+make group_include="standard mysql" all
203
+
193 204
 In addition to group_include (or instead), you can use 
194 205
 include_modules="modA modB"
195 206
 to specify exactly the modules you want to include, ex.
... ...
@@ -36,6 +36,9 @@
36 36
 #		which modules to include
37 37
 #		Also added new target print-modules that you can use to check which
38 38
 #		modules will be compiled (greger)
39
+#  2007-01-10   added new group_include targets mysql, radius, and presence 
40
+#		improved print-modules output
41
+#		fixed problem in include/exclude logic when using group_include (greger)
39 42
 
40 43
 auto_gen=lex.yy.c cfg.tab.c #lexx, yacc etc
41 44
 auto_gen_others=cfg.tab.h  # auto generated, non-c
... ...
@@ -83,6 +86,15 @@ module_group_standard_dep=acc_db acc_radius auth_db auth_radius avp_db avp_radiu
83 86
 				db_ops domain lcr msilo mysql dialog pa postgres \
84 87
 				presence_b2b rls speeddial uri_db xmlrpc
85 88
 
89
+# For mysql
90
+module_group_mysql=acc_db auth_db avp_db db_ops uri_db domain lcr msilo mysql speeddial
91
+
92
+# For radius
93
+module_group_radius=acc_radius auth_radius avp_radius
94
+
95
+# For presence
96
+module_group_presence=dialog pa presence_b2b rls
97
+
86 98
 # Modules in this group satisfy specific or niche applications, but are considered
87 99
 # stable for production use. They may or may not have dependencies
88 100
 # cpl-c => libxml2
... ...
@@ -97,9 +109,8 @@ module_group_experimental=tls
97 109
 
98 110
 # if not set on the cmd. line or the env, exclude the below modules.
99 111
 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 
112
+	# For group_include, default all modules are excluded except those in include_modules
113
+	exclude_modules?=
103 114
 else
104 115
 	# Old defaults for backwards compatibility
105 116
 	exclude_modules?= 			acc cpl ext extcmd radius_acc radius_auth vm\
... ...
@@ -117,9 +128,6 @@ endif
117 128
 # always exclude the CVS dir
118 129
 override exclude_modules+= CVS $(skip_modules)
119 130
 
120
-#always include this modules
121
-include_modules?=
122
-
123 131
 # Test for the groups and add to include_modules
124 132
 ifneq (,$(findstring standard,$(group_include)))
125 133
 	override include_modules+= $(module_group_standard)
... ...
@@ -129,6 +137,18 @@ ifneq (,$(findstring standard-dep,$(group_include)))
129 137
 	override include_modules+= $(module_group_standard_dep)
130 138
 endif
131 139
 
140
+ifneq (,$(findstring mysql,$(group_include)))
141
+	override include_modules+= $(module_group_mysql)
142
+endif
143
+
144
+ifneq (,$(findstring radius,$(group_include)))
145
+	override include_modules+= $(module_group_radius)
146
+endif
147
+
148
+ifneq (,$(findstring presence,$(group_include)))
149
+	override include_modules+= $(module_group_presence)
150
+endif
151
+
132 152
 ifneq (,$(findstring stable,$(group_include)))
133 153
 	override include_modules+= $(module_group_stable)
134 154
 endif
... ...
@@ -152,11 +172,20 @@ static_defs= $(foreach  mod, $(static_modules), \
152 172
 override extra_defs+=$(static_defs) $(EXTRA_DEFS)
153 173
 export extra_defs
154 174
 
155
-modules=$(filter-out $(addprefix modules/, \
175
+# Historically, the resultant set of modules is: modules/* - exclude_modules + include_modules
176
+# When group_include is used, we want: include_modules (based on group_include) - exclude_modules
177
+ifneq ($(group_include),)
178
+	modules=$(filter-out $(addprefix modules/, \
179
+			$(exclude_modules) $(static_modules)), \
180
+			$(addprefix modules/, $(include_modules) ))
181
+else	
182
+	# Standard, old resultant set
183
+	modules=$(filter-out $(addprefix modules/, \
156 184
 			$(exclude_modules) $(static_modules)), \
157 185
 			$(wildcard modules/*))
158
-modules:=$(filter-out $(modules), $(addprefix modules/, $(include_modules) )) \
186
+	modules:=$(filter-out $(modules), $(addprefix modules/, $(include_modules) )) \
159 187
 			$(modules)
188
+endif
160 189
 modules_names=$(shell echo $(modules)| \
161 190
 				sed -e 's/modules\/\([^/ ]*\)\/*/\1.so/g' )
162 191
 modules_basenames=$(shell echo $(modules)| \
... ...
@@ -231,9 +260,11 @@ all: $(NAME) modules
231 260
 
232 261
 .PHONY: print-modules
233 262
 print-modules:
234
-	@echo The following modules will be included: $(include_modules) ; \
263
+	@echo The following modules was chosen to be included: $(include_modules) ; \
235 264
 	echo ---------------------------------------------------------- ; \
236 265
 	echo The following modules will be excluded: $(exclude_modules) ; \
266
+	echo ---------------------------------------------------------- ; \
267
+	echo The following modules will be made: $(modules_basenames) ; \
237 268
 
238 269
 .PHONY: modules
239 270
 modules: