Browse code

Makefile: updated the groups of modules

- they are kept in Makefile.groups to keep main Makefile cleaner
- most of modules are in lists groupped mostly by dependency
- compilation and packaging groups are build using the lists
- exclude_modules list is automatically built from all modules without
those part of lists with external dependencies

Daniel-Constantin Mierla authored on 04/03/2013 15:09:36
Showing 3 changed files
... ...
@@ -127,6 +127,31 @@ endif
127 127
 # get the groups of modules to compile
128 128
 include Makefile.groups
129 129
 
130
+# - automatically build the list of excluded modules
131
+# if not set on the cmd. line, env or in the modules.lst (cfg_group_include)
132
+# exclude the below modules.
133
+ifneq ($(group_include)$(cfg_group_include),)
134
+	# For group_include, default all modules are excluded except those in
135
+	# include_modules
136
+	exclude_modules?=
137
+else
138
+	# Old defaults for backwards compatibility
139
+	# excluded because they depend on external libraries
140
+ifeq ($(origin exclude_modules), undefined)
141
+	exclude_modules:= $(sort \
142
+				$(filter-out $(module_group_default), $(mod_list_all)))
143
+endif
144
+endif
145
+
146
+# always add skip_modules list - it is done now in modules.lst (dcm)
147
+# override exclude_modules+= $(skip_modules)
148
+
149
+# Test for the groups and add to include_modules
150
+ifneq (,$(group_include))
151
+$(eval override include_modules+= $(foreach grp, $(group_include), \
152
+										$(module_group_$(grp)) ))
153
+endif
154
+
130 155
 ALLDEP=config.mak Makefile Makefile.dirs Makefile.sources Makefile.rules
131 156
 
132 157
 #include general defs (like CC, CFLAGS  a.s.o)
... ...
@@ -330,7 +355,7 @@ endif # (,$(basedir))
330 330
 
331 331
 else ifneq ($(config_mak),skip)
332 332
 
333
-config.mak: Makefile.defs
333
+config.mak: Makefile.defs Makefile.groups
334 334
 	@echo making config...
335 335
 	@echo "# this file is autogenerated by make cfg" >$@
336 336
 	@$(call mapf2,cfg_save_var,saved_fixed_vars,$(@))
... ...
@@ -343,15 +368,28 @@ config.mak: Makefile.defs
343 343
 
344 344
 endif # ifeq ($(config_mak),1)
345 345
 
346
-modules.lst:
346
+modules.lst: Makefile.groups
347 347
 	@echo  saving modules list...
348 348
 	@echo "# this file is autogenerated by make modules-cfg" >$@
349
+	@echo >>$@
350
+	@echo "# the list of sub-directories with modules" >>$@
349 351
 	@echo "modules_dirs:=$(modules_dirs)" >>$@
352
+	@echo >>$@
353
+	@echo "# the list of module groups to compile" >>$@
350 354
 	@echo "cfg_group_include=$(group_include)" >>$@
355
+	@echo >>$@
356
+	@echo "# the list of extra modules to compile" >>$@
351 357
 	@$(call cfg_save_var2,include_modules,$@)
358
+	@echo >>$@
359
+	@echo "# the list of static modules" >>$@
352 360
 	@$(call cfg_save_var2,static_modules,$@)
361
+	@echo >>$@
362
+	@echo "# the list of modules to skip from compile list" >>$@
353 363
 	@$(call cfg_save_var2,skip_modules,$@)
354
-	@$(call cfg_save_var2,exclude_modules,$@)
364
+	@echo >>$@
365
+	@echo "# the list of modules to exclude from compile list" >>$@
366
+	@$(call cfg_save_var3,exclude_modules,skip_modules,$@)
367
+	@echo >>$@
355 368
 	@$(foreach mods,$(modules_dirs), \
356 369
 		$(call cfg_save_var2,$(mods)_all,$@))
357 370
 	@$(foreach mods,$(modules_dirs), \
... ...
@@ -1,245 +1,306 @@
1 1
 # Module groups definitions
2 2
 #
3 3
 
4
-# - default only include the standard group
5
-# Make backwards compatible, don't set group_include default...
6
-# group_include?="standard"
7
-
8
-# Modules in this group are considered a standard part (due to 
9
-# widespread usage) and have no external compile or link dependencies (note 
10
-# that some of these interplay with external systems).
11
-module_group_standard=acc_syslog auth avp ctl dispatcher diversion enum\
12
-				eval exec fifo db_flatstore gflags maxfwd mediaproxy \
13
-				nathelper options pdt permissions pike print ratelimit \
14
-				registrar rr rtpproxy sanity sl textops timer tm uac \
15
-				unixsock uri usrloc xlog cfg_rpc sipcapture msrp tmrec
16
-
17
-# Modules in this group are considered a standard part of SER (due to 
18
-# widespread usage) but they have dependencies that must be satisfied for 
19
-# compilation.
20
-# acc_radius, auth_radius, misc_radius => radiusclient-ng
21
-# acc_db, auth_db, avp_db, db_ops, domain, lcr, msilo, dialog, speeddial,
22
-# uri_db => database module (db_mysql, db_postgres, dbtext ...)
23
-# mysql, postgres => mysql server and client libraries or postgres server and
24
-#  client libraries or other database back-end (ex. mysql-devel)
25
-# pa, xmlrpc => libxml2
26
-# rls => pa
4
+# lists are sets of modules that don't include modules that are in other lists
5
+# - break the lists as needed in order to use them to build desired groups
6
+#   and packages
27 7
 #
28
-# NOTE! All presence modules (dialog, pa, presence_b2b, rls, xcap) have been
29
-# included in this group due to interdependencies
30
-module_group_standard_dep=acc_db acc_radius auth_db auth_radius avp_db \
31
-				auth_identity db_ops domain lcr misc_radius \
32
-				msilo dialog pa \
33
-				presence_b2b rls speeddial uri_db xcap xmlrpc
8
+
9
+
10
+# - basic used modules, with no extra dependency (widespread usage)
11
+mod_list_basic=async auth benchmark blst cfg_rpc cfgutils corex counters \
12
+				   ctl debugger diversion enum exec ipops kex mangler maxfwd \
13
+				   mediaproxy mi_datagram mi_fifo mi_rpc mqueue \
14
+				   nat_traversal nathelper path pike pv ratelimit rr rtimer \
15
+				   rtpproxy sanity sdpops siputils sl statistics textops \
16
+				   textopsx tm tmx topoh xlog
17
+
18
+# - extra used modules, with no extra dependency
19
+mod_list_extra=avp auth_diameter call_control dmq domainpolicy msrp pdb qos \
20
+				 sca seas sms sst timer tmrec uac_redirect xhttp xhttp_rpc \
21
+				 xprint
22
+
23
+# - common modules depending on database
24
+mod_list_db=acc alias_db auth_db avpops cfg_db db_text db_flatstore \
25
+			  db_cluster dialog dispatcher domain drouting group \
26
+			  htable imc matrix msilo mtree p_usrloc pdt permissions \
27
+			  pipelimit prefix_route registrar sipcapture siptrace speeddial \
28
+			  sqlops uac uri_db userblacklist usrloc
29
+
30
+
31
+# - common modules depending on database, using UID db schema
32
+mod_list_dbuid=db2_ops uid_auth_db uid_avp_db uid_domain uid_gflags \
33
+				 uid_uri_db
34
+
35
+# - modules for devel purposes
36
+mod_list_devel=malloc_test print print_lib
37
+
38
+# - modules depending on pcre3 library
39
+mod_list_pcre=dialplan lcr regex
40
+
41
+# - modules depending on radius client library
42
+mod_list_radius=acc_radius auth_radius misc_radius peering
43
+
44
+# - modules depending on ldap client library
45
+mod_list_ldap=db2_ldap h350 ldap
46
+
47
+# - modules depending on mysql client library
48
+mod_list_mysql=db_mysql
49
+
50
+# - modules depending on postgres client library
51
+mod_list_postgres=db_postgres
52
+
53
+# - modules depending on unixodbc library
54
+mod_list_unixodbc=db_unixodbc
55
+
56
+# - modules depending on mysql cassandra library
57
+mod_list_cassandra=db_cassandra
58
+
59
+# - modules depending on xml2 library
60
+mod_list_cpl=cpl-c
61
+
62
+# - modules depending on xml2 library
63
+mod_list_xmldeps=xhttp_pi xmlrpc xmlops
64
+
65
+# - modules depending on xml c rpc library
66
+mod_list_mi_xmlrpc=mi_xmlrpc
67
+
68
+# - modules depending on net-snmp library
69
+mod_list_snmpstats=snmpstats
70
+
71
+# - modules depending on expat library
72
+mod_list_xmpp=xmpp
73
+
74
+# - modules depending on confuse library
75
+mod_list_carrierroute=carrierroute
76
+
77
+# - modules depending on bdb (db4) library
78
+mod_list_berkeley=db_berkeley
79
+
80
+# - modules depending on curl library
81
+mod_list_utils=utils
82
+
83
+# - modules depending on purple library
84
+mod_list_purple=purple
85
+
86
+# - modules depending on memcache library
87
+mod_list_memcached=memcached
88
+
89
+# - modules depending on openssl library
90
+mod_list_tlsdeps=auth_identity outbound tls
91
+
92
+# - modules depending on unistring library
93
+mod_list_websocket=websocket
94
+
95
+# - modules related to SIMPLE presence extensions
96
+mod_list_presence=presence presence_conference presence_dialoginfo \
97
+					   presence_mwi presence_profile presence_reginfo \
98
+					   presence_xml \
99
+					   pua pua_bla pua_dialoginfo pua_mi pua_reginfo \
100
+					   pua_usrloc pua_xmpp \
101
+					   rls xcap_client xcap_server
102
+
103
+
104
+# - modules depending on lua library
105
+mod_list_lua=app_lua
106
+
107
+# - modules depending on perl library
108
+mod_list_perldeps=app_perl db_perlvdb
109
+
110
+# - modules depending on python library
111
+mod_list_python=app_python
112
+
113
+# - modules depending on geoip library
114
+mod_list_geoip=geoip
115
+
116
+# - modules depending on sqlite library
117
+mod_list_sqlite=db_sqlite
118
+
119
+# - modules depending on oracle library
120
+mod_list_oracle=db_oracle
121
+
122
+# - modules depending on json library
123
+mod_list_json=json jsonrpc-c
124
+
125
+# - modules depending on redis library
126
+mod_list_redis=ndb_redis
127
+
128
+# - modules depending on mono library
129
+mod_list_mono=app_mono
130
+
131
+# - modules related to IMS extensions
132
+mod_list_ims=cdp cdp_avp dialog_ng ims_auth ims_isc ims_icscf ims_qos \
133
+			   ims_registrar_pcscf ims_registrar_scscf ims_usrloc_pcscf \
134
+			   ims_usrloc_scscf
135
+
136
+# - modules depending on osp toolkit library
137
+mod_list_osp=osp
138
+
139
+# - modules depending on iptables library
140
+mod_list_iptrtpproxy=iptrtpproxy
141
+
142
+# - all modules
143
+mod_list_all=$(sort $(mod_list_basic) $(mod_list_extra) \
144
+			   $(mod_list_db) $(mod_list_dbuid) \
145
+			   $(mod_list_devel) $(mod_list_pcre) \
146
+			   $(mod_list_radius) $(mod_list_ldap) \
147
+			   $(mod_list_mysql) $(mod_list_postgres) \
148
+			   $(mod_list_unixodbc) $(mod_list_xmldeps) \
149
+			   $(mod_list_perldeps) $(mod_list_cpl) \
150
+			   $(mod_list_xmpp) $(mod_list_carrierroute) \
151
+			   $(mod_list_berkeley) $(mod_list_utils) \
152
+			   $(mod_list_purple) $(mod_list_memcached) \
153
+			   $(mod_list_tlsdeps) $(mod_list_websocket) \
154
+			   $(mod_list_snmpstats) $(mod_list_presence) \
155
+			   $(mod_list_lua) $(mod_list_python) \
156
+			   $(mod_list_geoip) $(mod_list_sqlite) \
157
+			   $(mod_list_json) $(mod_list_redis) \
158
+			   $(mod_list_mono) $(mod_list_ims) \
159
+			   $(mod_list_cassandra) $(mod_list_oracle) \
160
+			   $(mod_list_iptrtpproxy) $(mod_list_mi_xmlrpc) \
161
+			   $(mod_list_osp) )
162
+
163
+
164
+
165
+### --- Groups defined for source code compilation ###
166
+
167
+# groups are sets of modules selected by compile target interest (should be
168
+# built by combining lists)
169
+
170
+# Modules in this group are the default compiled modules due to 
171
+# no external compile or link dependencies
172
+module_group_default=$(mod_list_basic) $(mod_list_extra) \
173
+					  $(mod_list_db) $(mod_list_dbuid) \
174
+					  $(mod_list_devel)
175
+
176
+# Modules in this group are the default compiled modules due to 
177
+# no internal/external compile or link dependencies
178
+module_group_standard=$(mod_list_basic) $(mod_list_extra) \
179
+					  $(mod_list_devel)
180
+
181
+# Modules in this group are considered a standard part due to 
182
+# widespread usage, but they have dependencies that must be satisfied for 
183
+# compilation (e.g., lcr, radius, presence, tls, ...).
184
+module_group_common=$(mod_list_db) $(mod_list_dbuid) \
185
+					$(mod_list_pcre) $(mod_list_radius) \
186
+					$(mod_list_xmldeps) $(mod_list_presence) \
187
+					$(mod_list_tlsdeps)
34 188
 
35 189
 # For db use (db modules, excluding drivers)
36
-module_group_db=acc_db auth_db avp_db db_ops db_text \
37
-				uri_db domain lcr msilo speeddial
38
-				#dbtext (s) not migrated yet to the new db interface
190
+module_group_db=$(mod_list_db)
39 191
 
40 192
 # For mysql
41
-module_group_mysql_driver=db_mysql
193
+module_group_mysql_driver=$(mod_list_mysql)
42 194
 module_group_mysql=$(module_group_mysql_driver) $(module_group_db)
43 195
 
44 196
 # For postgress
45
-module_group_postgres_driver=db_postgres
197
+module_group_postgres_driver=$(mod_list_postgres)
46 198
 module_group_postgres=$(module_group_postgres_driver) $(module_group_db)
47 199
 
48 200
 # For radius
49
-module_group_radius=acc_radius auth_radius misc_radius avp_radius uri_radius \
50
-					peering
201
+module_group_radius=$(mod_list_radius)
51 202
 
52 203
 # For presence
53 204
 # kamailio modules
54
-module_group_presence=presence presence_dialoginfo presence_mwi presence_xml presence_profile\
55
-						pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp \
56
-						rls xcap_client xcap_server presence_conference \
57
-						presence_reginfo pua_reginfo
58
-#ser modules
59
-module_group_presence+=dialog presence_b2b xcap
60
-# obsolete/unmaintained ser modules
61
-#module_group_presence=pa rls
62
-
63
-# Modules in this group satisfy specific or niche applications, but are 
64
-# considered stable for production use. They may or may not have dependencies
65
-# cpl-c => libxml2
66
-# jabber => expat (library)
67
-# osp => OSP Toolkit (sipfoundry)
68
-# sms => none (external modem)
69
-module_group_stable=cpl-c dbtext jabber osp sms pdb
70
-
71
-# Modules in this group are either not complete, untested, or without enough
72
-# reports of usage to allow the module into the stable group. They may or may
73
-# not have dependencies
74
-module_group_experimental=tls oracle iptrtpproxy ndb_redis async websocket outbound
205
+module_group_presence=$(mod_list_presence)
75 206
 
76 207
 # For cassandra
77
-module_group_cassandra_driver=db_cassandra
208
+module_group_cassandra_driver=$(mod_list_cassandra)
78 209
 module_group_cassandra=$(module_group_cassandra_driver) $(module_group_db)
79 210
 
211
+# For all modules not compiled by default
212
+module_group_ignore= $(sort $(filter-out $(module_group_default), $(mod_list_all)))
213
+
214
+
215
+
216
+### --- Groups defined for packaging ###
80 217
 
81
-### Kamailio specific groups ###
82 218
 # Standard modules in K Debian distro
83
-module_group_kstandard=acc alias_db auth auth_db benchmark call_control corex \
84
-				cfgutils db_text dialog dispatcher diversion domain drouting \
85
-				exec group htable imc kex maxfwd mi_datagram mi_fifo msilo \
86
-				nat_traversal nathelper path pdt permissions pike pv qos \
87
-				ratelimit regex registrar rr rtimer rtpproxy siptrace siputils \
88
-				sl sms speeddial sqlops sst statistics textops tmx uac \
89
-				uac_redirect uri_db userblacklist usrloc xlog seas \
90
-				avpops cfg_db cfg_rpc ctl db_flatstore dialplan enum \
91
-				iptrtpproxy lcr mediaproxy mi_rpc pdb sanity tm topoh \
92
-				blst prefix_route counters debugger matrix mqueue mtree \
93
-				pipelimit rtpproxy textopsx xhttp xhttp_rpc ipops p_usrloc \
94
-				sdpops async sipcapture dmq msrp tmrec db_cluster
219
+module_group_kstandard=$(mod_list_basic) $(mod_list_extra) \
220
+					  $(mod_list_db) $(mod_list_dbuid) \
221
+					  $(mod_list_pcre)
95 222
 
96 223
 # K mysql module
97
-module_group_kmysql=db_mysql
224
+module_group_kmysql=$(mod_list_mysql)
98 225
 
99 226
 # K postgress module
100
-module_group_kpostgres=db_postgres
227
+module_group_kpostgres=$(mod_list_postgres)
101 228
 
102 229
 # K cpl module
103
-module_group_kcpl=cpl-c
230
+module_group_kcpl=$(mod_list_cpl)
231
+
232
+# K xml modules
233
+module_group_kxml=$(mod_list_xmldeps) $(mod_list_mi_xmlrpc)
104 234
 
105 235
 # K radius modules
106
-module_group_kradius=acc_radius auth_radius misc_radius peering
236
+module_group_kradius=$(mod_list_radius)
107 237
 
108 238
 # K unixodbc module
109
-module_group_kunixodbc=db_unixodbc
110
-
111
-# K xmlrpc modules
112
-module_group_kxml=xmlrpc mi_xmlrpc xmlops
239
+module_group_kunixodbc=$(mod_list_unixodbc)
113 240
 
114 241
 # K perl module
115
-module_group_kperl=app_perl db_perlvdb
242
+module_group_kperl=$(mod_list_app_perl)
116 243
 
117 244
 # K snmpstats module
118
-module_group_ksnmpstats=snmpstats
245
+module_group_ksnmpstats=$(mod_list_snmpstats)
119 246
 
120 247
 # K xmpp module
121
-module_group_kxmpp=xmpp
248
+module_group_kxmpp=$(mod_list_xmpp)
122 249
 
123 250
 # K carrierroute module
124
-module_group_kcarrierroute=carrierroute
251
+module_group_kcarrierroute=$(mod_list_carrierroute)
125 252
 
126 253
 # K berkeley module
127
-module_group_kberkeley=db_berkeley
254
+module_group_kberkeley=$(mod_list_berkeley)
128 255
 
129 256
 # K ldap modules
130
-module_group_kldap=ldap db2_ldap h350
257
+module_group_kldap=$(mod_list_ldap)
131 258
 
132 259
 # K utils module
133
-module_group_kutils=utils
260
+module_group_kutils=$(mod_list_utils)
134 261
 
135 262
 # K purple module
136
-module_group_kpurple=purple
263
+module_group_kpurple=$(mod_list_purple)
137 264
 
138 265
 # K memcached module
139
-module_group_kmemcached=memcached
266
+module_group_kmemcached=$(mod_list_memcached)
140 267
 
141 268
 # K tls module
142
-module_group_ktls=tls
269
+module_group_ktls=$(mod_list_tlsdeps)
143 270
 
144 271
 # K websocket module
145
-module_group_kwebsocket=websocket
146
-
147
-# K outbound module
148
-module_group_koutbound=outbound
272
+module_group_kwebsocket=$(mod_list_websocket)
149 273
 
150 274
 # K presence modules
151
-module_group_kpresence=presence presence_dialoginfo presence_mwi presence_xml presence_profile\
152
-						pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp \
153
-						rls xcap_client xcap_server presence_conference \
154
-						presence_reginfo pua_reginfo
275
+module_group_kpresence=$(mod_list_presence)
155 276
 
156 277
 # K lua module
157
-module_group_klua=app_lua
278
+module_group_klua=$(mod_list_lua)
158 279
 
159 280
 # K python module
160
-module_group_kpython=app_python
281
+module_group_kpython=$(mod_list_python)
161 282
 
162 283
 # K geoip module
163
-module_group_kgeoip=geoip
284
+module_group_kgeoip=$(mod_list_geoip)
164 285
 
165 286
 # K sqlite module
166
-module_group_ksqlite=db_sqlite
287
+module_group_ksqlite=$(mod_list_sqlite)
167 288
 
168 289
 # K json modules
169
-module_group_kjson=json jsonrpc-c
290
+module_group_kjson=$(mod_list_json)
170 291
 
171 292
 # K redis module
172
-module_group_kredis=ndb_redis
293
+module_group_kredis=$(mod_list_redis)
173 294
 
174 295
 # K mono module
175
-module_group_kmono=app_mono
296
+module_group_kmono=$(mod_list_mono)
176 297
 
177 298
 # For IMS
178 299
 # kamailio modules
179
-module_group_kims=ims_auth cdp cdp_avp dialog_ng ims_qos ims_isc ims_icscf\
180
-                        ims_registrar_pcscf ims_registrar_scscf ims_usrloc_pcscf ims_usrloc_scscf
181
-
182
-# if not set on the cmd. line, env or in the modules.lst (cfg_group_include)
183
-# exclude the below modules.
184
-ifneq ($(group_include)$(cfg_group_include),)
185
-	# For group_include, default all modules are excluded except those in 
186
-	# include_modules
187
-	exclude_modules?=
188
-else
189
-	# Old defaults for backwards compatibility
190
-	# excluded because they depend on external libraries
191
-	exclude_modules?= 		cpl mangler postgres jabber mysql cpl-c \
192
-							auth_radius misc_radius avp_radius uri_radius \
193
-							acc_radius pa rls presence_b2b xcap xmlrpc\
194
-							osp tls oracle \
195
-							unixsock dbg print_lib auth_identity db2_ldap ldap \
196
-							db_berkeley db_mysql db_postgres db_oracle \
197
-							db_sqlite db_unixodbc db_cassandra memcached mi_xmlrpc \
198
-							app_perl db_perlvdb purple \
199
-							snmpstats xmpp cdp \
200
-							carrierroute peering \
201
-							dialplan lcr utils presence presence_mwi \
202
-							presence_dialoginfo presence_xml pua pua_bla \
203
-							pua_dialoginfo pua_usrloc pua_xmpp \
204
-							regex xcap_client xcap_server presence_conference \
205
-							presence_reginfo pua_reginfo websocket outbound
206
-	#excluded because they depend on external *.h files
207
-	exclude_modules+= h350
208
-	# excluded because they do not compile (remove them only after they are
209
-	#  fixed) -- andrei
210
-	exclude_modules+= bdb dbtext iptrtpproxy pa rls
211
-	# depends on libgeoip
212
-	exclude_modules+= geoip
213
-	# depends on liblua5.1-dev
214
-	exclude_modules+= app_lua
215
-	# depends on libpython-dev
216
-	exclude_modules+= app_python
217
-	# depends on libxml2
218
-	exclude_modules+= xmlops xhttp_pi
219
-	# depends on jsoc-c
220
-	exclude_modules+= json jsonrpc-c
221
-	# depends on libhiredis
222
-	exclude_modules+= ndb_redis
223
-	# depends on mono-devel
224
-	exclude_modules+= app_mono
225
-	# depends on tm being compiled with -DWITH_AS_SUPPORT support
226
-ifeq (,$(findstring -DWITH_AS_SUPPORT, $(C_DEFS)))
227
-		exclude_modules+= seas
228
-endif
229
-endif
230
-
231
-# always exclude the CVS dir
232
-override exclude_modules+= CVS $(skip_modules)
233
-
234
-# Test for the groups and add to include_modules
235
-ifneq (,$(group_include))
236
-$(eval override include_modules+= $(foreach grp, $(group_include), \
237
-										$(module_group_$(grp)) ))
238
-endif
239
-
240
-# first 2 lines are excluded because of the experimental or incomplete
241
-# status of the modules
242
-# the rest is excluded because it depends on external libraries
300
+module_group_kims=$(mod_list_ims)
301
+
302
+
303
+# list of static modules
243 304
 #
244 305
 static_modules:=
245 306
 
... ...
@@ -18,10 +18,15 @@ cfg_gen_var=echo "$(1)=$(call escape_values,$($(1)))"
18 18
 # it would generate "echo var=$(FOO)" and not "echo var=1"
19 19
 cfg_gen_var2=echo "$(1)=$(call escape_values,$(value $(1)))"
20 20
 
21
+# generate a var from itself concatenated with another one
22
+cfg_gen_var3=echo "$(1)=$(call escape_values,$(value $(1))) \$$($(2))"
23
+
21 24
 # generates echo "$(1)=escape($(1)) >> $(2)"
22 25
 cfg_save_var=$(call cfg_gen_var,$(1)) >>$(2);
23 26
 # same as above but uses cfg_gen_var2
24 27
 cfg_save_var2=$(call cfg_gen_var2,$(1)) >>$(2);
28
+# concatenate another var to first var
29
+cfg_save_var3=$(call cfg_gen_var3,$(1),$(2)) >>$(3);
25 30
 
26 31
 # map function $(1) on variable list $($(2)) (the function is used with only
27 32
 # one arg)