Module: sip-router Branch: master Commit: b5cb01a366c63dd1e3cbf1f488f38a5dd61c8f7d URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b5cb01a3...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Wed Jul 8 17:31:56 2009 +0200
makefile: fix make cfg when the cfg vars are already exported
- when make cfg was called with the cfg vars already exported it failed to generate a proper config.mak (e.g. called from make deb) - extra config sanity check - s/mysql/db_mysql in the mysql module group - added "deb" to the list of targets that don't need dependencies (minor optimization)
---
Makefile | 10 ++++++++-- Makefile.cfg | 1 + Makefile.targets | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile index a98b596..e203739 100644 --- a/Makefile +++ b/Makefile @@ -156,8 +156,8 @@ module_group_standard_dep=acc_db acc_radius auth_db auth_radius avp_db \ presence_b2b rls speeddial uri_db xcap xmlrpc
# For mysql -module_group_mysql=acc_db auth_db avp_db db_ops uri_db domain lcr msilo mysql\ - speeddial +module_group_mysql=acc_db auth_db avp_db db_ops db_mysql uri_db domain lcr \ + msilo speeddial
# For radius module_group_radius=acc_radius auth_radius avp_radius misc_radius peering @@ -264,6 +264,9 @@ ifeq ($(makefile_defs),1) $(info config.mak loaded) # config_make valid & used config_mak=1 +ifeq ($(MAIN_NAME),) +$(error "bad config.mak, try re-running make cfg") +endif endif else # config.mak doesn't need to be used ifneq (,$(filter cfg config cfg-defs,$(word 1,$(MAKECMDGOALS)))) @@ -273,6 +276,9 @@ ifneq (,$(filter cfg config cfg-defs,$(word 1,$(MAKECMDGOALS)))) # $(value ...) expansion or would cause some warning (if Makefile.defs exec. # is skipped in the "main" makefile invocation). $(shell rm -rf config.mak) +config_mak=0 +makefile_defs=0 +exported_vars=0 endif endif
diff --git a/Makefile.cfg b/Makefile.cfg index d7b7c71..0ef3ead 100644 --- a/Makefile.cfg +++ b/Makefile.cfg @@ -14,6 +14,7 @@ #create config if needed $(COREPATH)/config.mak: makefile_defs=0 $(COREPATH)/config.mak: exported_vars=0 +$(COREPATH)/config.mak: config_mak=0
$(COREPATH)/config.mak: $(COREPATH)/Makefile.defs $(MAKE) -wC $(COREPATH) cfg-defs diff --git a/Makefile.targets b/Makefile.targets index 9ba0ef8..43d5d2b 100644 --- a/Makefile.targets +++ b/Makefile.targets @@ -35,7 +35,7 @@ doc_targets:= README man install-doc install-man install-ser-man \ # auxiliary: maintance, debugging, etc. (don't affect code/objects) aux_targets:= TAGS tar dist cfg-defs cfg config config.mak print-modules \ dbg dbinstall librpath.lst makecfg.lst modules.lst modules-cfg \ - modules-list modules-lst mk-install_dirs autover.h + modules-list modules-lst mk-install_dirs autover.h deb # other targets that don't produce code in the current directory ("external") ext_targets:= every-module $(modules_dirs) libs utils \ install-cfg install-utils install-modules-all install-every-module\