Browse Source

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
Andrei Pelinescu-Onciul 16 years ago
parent
commit
380398ad08
3 changed files with 29 additions and 33 deletions
  1. 14 3
      INSTALL
  2. 14 29
      Makefile
  3. 1 1
      Makefile.targets

+ 14 - 3
INSTALL

@@ -171,7 +171,11 @@ Compile SIP Router core only:
 make   #builds only sip-router core, equivalent to make sip-router
 make   #builds only sip-router core, equivalent to make sip-router
 
 
 Compile modules except some explicitly excepted (see below)
 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:
 Compile all:
 make 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.
     but they have no dependencies (note that some of these interplay with external systems.
     However, they don't have compile or link dependencies).
     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.
     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
     NOTE! All presence modules (dialog, pa, presence_b2b, rls, xcap) have been included in this
     group due to interdependencies
     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:
 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
 radius - Include all modules on radiusclient
 
 

+ 14 - 29
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 \
 				db_ops domain lcr msilo mysql dialog pa postgres \
 				presence_b2b rls speeddial uri_db xcap xmlrpc
 				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
 # 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
 # For radius
 module_group_radius=acc_radius auth_radius avp_radius misc_radius peering
 module_group_radius=acc_radius auth_radius avp_radius misc_radius peering
@@ -212,32 +220,9 @@ endif
 override exclude_modules+= CVS $(skip_modules)
 override exclude_modules+= CVS $(skip_modules)
 
 
 # Test for the groups and add to include_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
 endif
 
 
 # first 2 lines are excluded because of the experimental or incomplete
 # 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)))))
 #$(foreach mods,$(modules_dirs),$(eval  $(info DUMP: $(call MODULES_RULES_template,$(mods)))))
 
 
 # build all the modules
 # build all the modules
-every-module: $(modules_dirs)
+modules-all every-module: $(modules_dirs)
 
 
 $(extra_objs):
 $(extra_objs):
 	@echo "Extra objs: $(extra_objs)" 
 	@echo "Extra objs: $(extra_objs)" 

+ 1 - 1
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 \
 		dbg dbinstall librpath.lst makecfg.lst modules.lst modules-cfg \
 		modules-list modules-lst mk-install_dirs autover.h deb
 		modules-list modules-lst mk-install_dirs autover.h deb
 # other targets that don't produce code in the current directory ("external")
 # 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\
 		install-cfg install-utils  install-modules-all install-every-module\
 		$(foreach m,$(modules_dirs),install-$(m)) \
 		$(foreach m,$(modules_dirs),install-$(m)) \
 		install-share
 		install-share