Browse code

makefile: fix group_modules

- make cfg group_include="standard presence"; make all did not make the
presence modules because the excluded list was re-evaluated.
(see SER-415)

Reported-by: Bogdan Pintea <pintea@iptego.de>

Andrei Pelinescu-Onciul authored on 13/11/2008 16:23:32
Showing 1 changed files
... ...
@@ -78,6 +78,15 @@ skip_modules?=
78 78
 # Alternatives are txt, html, xhtml, and pdf (see Makefile.doc)
79 79
 doc_format?=html
80 80
 
81
+include modules.lst
82
+
83
+#if called with group_include, ignore the modules from modules.lst
84
+ifneq ($(group_include),)
85
+	include_modules=
86
+	exclude_modules=
87
+	modules_configured:=0
88
+endif
89
+
81 90
 # Module group definitions, default only include the standard group
82 91
 # Make backwards compatible, don't set group_include default...
83 92
 #group_include?="standard"
... ...
@@ -132,8 +141,9 @@ module_group_stable=cpl-c dbtext jabber osp sms
132 132
 # not have dependencies
133 133
 module_group_experimental=tls oracle iptrtpproxy
134 134
 
135
-# if not set on the cmd. line or the env, exclude the below modules.
136
-ifneq ($(group_include),)
135
+# if not set on the cmd. line, env or in the modules.lst (cfg_group_include)
136
+# exclude the below modules.
137
+ifneq ($(group_include)$(cfg_group_include),)
137 138
 	# For group_include, default all modules are excluded except those in 
138 139
 	# include_modules
139 140
 	exclude_modules?=
... ...
@@ -220,7 +230,6 @@ $(shell rm -rf config.mak)
220 220
 endif
221 221
 endif
222 222
 
223
-include modules.lst
224 223
 
225 224
 main_makefile=1
226 225
 include Makefile.defs
... ...
@@ -337,7 +346,7 @@ endif # ifeq ($(config_mak),1)
337 337
 modules.lst:
338 338
 	@echo  saving modules list...
339 339
 	@echo "# this file is autogenerated by make modules-cfg" >$@
340
-	@$(call cfg_save_var2,group_include,$@)
340
+	@echo "cfg_group_include=$(group_include)" >>$@
341 341
 	@$(call cfg_save_var2,include_modules,$@)
342 342
 	@$(call cfg_save_var2,static_modules,$@)
343 343
 	@$(call cfg_save_var2,skip_modules,$@)