Module: sip-router
Branch: master
Commit: 380398ad08e1080ea3a2f7d521aeb4c8aa04bef6
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=380398a…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Wed Jul 8 18:41:38 2009 +0200
makefile: more modules groups and make modules-all
- added more module groups (db, mysql_driver, postgres_driver)
- cleaned up module groups usage (replaced a lot of ifs with a
foreach)
- modules-all is now a synonym for every-module
---
INSTALL | 17 ++++++++++++++---
Makefile | 43 ++++++++++++++-----------------------------
Makefile.targets | 2 +-
3 files changed, 29 insertions(+), 33 deletions(-)
diff --git a/INSTALL b/INSTALL
index dc2c93f..461bd8a 100644
--- a/INSTALL
+++ b/INSTALL
@@ -171,7 +171,11 @@ Compile SIP Router core only:
make #builds only sip-router core, equivalent to make sip-router
Compile modules except some explicitly excepted (see below)
-make modules
+make modules - all modules in the modules/ directory (common modules)
+make modules_s - all modules in the modules_s/ directory (ser modules)
+make modules_k - all modules in the modules_k/ directory (kamailio modules)
+make modules-all or make every-module - all the modules (modules, modules_s
+ and module_k)
Compile all:
make all
@@ -189,7 +193,12 @@ standard - Modules in this group are considered a standard part of
SIP Router (d
but they have no dependencies (note that some of these interplay with external
systems.
However, they don't have compile or link dependencies).
-standard-dep - Modules in this group are considered a standard part of SIP Router (due
to widespread usage)
+db - Modules in this group use databases and need a database driver to run.
+ Included are drivers for the text mode db (dbtext) and for dumping
+ large ammount of data to files (db_flatstore). See also the mysql or
+ postgres groups.
+
+standard_dep - Modules in this group are considered a standard part of SIP Router (due
to widespread usage)
but they have dependencies that most be satisfied for compilation.
NOTE! All presence modules (dialog, pa, presence_b2b, rls, xcap) have been included
in this
group due to interdependencies
@@ -208,7 +217,9 @@ make group_include="standard standard-dep stable
experimental" all
There are also in addition some "convenience" groups:
-mysql - Include all modules dependent on mysql
+mysql - Include all the db modules dependent and the mysql db driver
+
+postgres - Include all the db modules and the postgres db driver
radius - Include all modules on radiusclient
diff --git a/Makefile b/Makefile
index e203739..a12d685 100644
--- a/Makefile
+++ b/Makefile
@@ -155,9 +155,17 @@ module_group_standard_dep=acc_db acc_radius auth_db auth_radius
avp_db \
db_ops domain lcr msilo mysql dialog pa postgres \
presence_b2b rls speeddial uri_db xcap xmlrpc
+# For db use (db modules, excluding drivers)
+module_group_db=acc_db auth_db avp_db db_ops db_flatstore dbtext db_text \
+ uri_db domain lcr msilo speeddial
+
# For mysql
-module_group_mysql=acc_db auth_db avp_db db_ops db_mysql uri_db domain lcr \
- msilo speeddial
+module_group_mysql_driver=db_mysql
+module_group_mysql=$(module_group_mysql_driver) $(module_group_db)
+
+# For postgress
+module_group_postgres_driver=db_postgres
+module_group_postgres=$(module_group_postgres_driver) $(module_group_db)
# For radius
module_group_radius=acc_radius auth_radius avp_radius misc_radius peering
@@ -212,32 +220,9 @@ endif
override exclude_modules+= CVS $(skip_modules)
# Test for the groups and add to include_modules
-ifneq (,$(findstring standard,$(group_include)))
- override include_modules+= $(module_group_standard)
-endif
-
-ifneq (,$(findstring standard-dep,$(group_include)))
- override include_modules+= $(module_group_standard_dep)
-endif
-
-ifneq (,$(findstring mysql,$(group_include)))
- override include_modules+= $(module_group_mysql)
-endif
-
-ifneq (,$(findstring radius,$(group_include)))
- override include_modules+= $(module_group_radius)
-endif
-
-ifneq (,$(findstring presence,$(group_include)))
- override include_modules+= $(module_group_presence)
-endif
-
-ifneq (,$(findstring stable,$(group_include)))
- override include_modules+= $(module_group_stable)
-endif
-
-ifneq (,$(findstring experimental,$(group_include)))
- override include_modules+= $(module_group_experimental)
+ifneq (,$(group_include))
+override include_modules+=$(foreach grp, $(group_include), \
+ $(module_group_$(grp)) )
endif
# first 2 lines are excluded because of the experimental or incomplete
@@ -627,7 +612,7 @@ $(foreach mods,$(modules_dirs),$(eval $(call
MODULES_RULES_template,$(mods))))
#$(foreach mods,$(modules_dirs),$(eval $(info DUMP: $(call
MODULES_RULES_template,$(mods)))))
# build all the modules
-every-module: $(modules_dirs)
+modules-all every-module: $(modules_dirs)
$(extra_objs):
@echo "Extra objs: $(extra_objs)"
diff --git a/Makefile.targets b/Makefile.targets
index 43d5d2b..3541bfe 100644
--- a/Makefile.targets
+++ b/Makefile.targets
@@ -37,7 +37,7 @@ 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 deb
# other targets that don't produce code in the current directory
("external")
-ext_targets:= every-module $(modules_dirs) libs utils \
+ext_targets:= every-module modules-all $(modules_dirs) libs utils \
install-cfg install-utils install-modules-all install-every-module\
$(foreach m,$(modules_dirs),install-$(m)) \
install-share