Browse code

- added new make env./cmd. line parameters:

exclude_modules="module1 module2" (this was before but now it can be changed
form the command line) == compile all the modules in modules/* except
module1 & module2

skip_modules="module1 module2" == compile all the modules not excluded by
default except module1 & module2 == module/* -$(exclude_module)-$(skip_module)

include_modules="module1 module2" == compile all the modules not excluded by
defautl + module1 and module2

All this can be combined in any way. exclude_modules contains by default (if
not overwritten from the cmd. line or env) the list of experimental modules +
the list of modules with external dependecies (like jabber, *_radius).

More examples in INSTALL

Andrei Pelinescu-Onciul authored on 17/04/2003 12:52:13
Showing 3 changed files
... ...
@@ -102,9 +102,27 @@ make mode=debug PROFILE=-pg all
102 102
 
103 103
 make modules=modules/print modules
104 104
 
105
--compile all the modules except textops
105
+-compile all the "default" modules except textops and vm
106
+
107
+make skip_modules="textops vm" modules
108
+
109
+-compile all default modules and include uri_radius (not compiled by default):
110
+
111
+make include_modules="uri_radius" modules
112
+
113
+-compile all the modules from the modules subdirectory (even the one excluded
114
+by default):
115
+
116
+make exclude_modules="" modules
117
+
118
+-compile all the modules from the modules subdirectory excluding vm:
119
+
120
+make exclude_modules=vm modules
121
+
122
+or
123
+
124
+make exclude_modules="" skip_modules=vm modules
106 125
 
107
-make exclude_modules="CVS textops" modules
108 126
 
109 127
 -compile with the "tm" module statically linked and with profiling
110 128
 
... ...
@@ -14,6 +14,8 @@
14 14
 #                  Tomas Bj´┐Żrklund <tomas@webservices.se>
15 15
 #  2003-03-11  PREFIX & LOCALBASE must also be exported (andrei)
16 16
 #  2003-04-07  hacked to work with solaris install (andrei)
17
+#  2003-04-17  exclude modules overwritable from env. or cmd. line,
18
+#               added include_modules and skip_modules (andrei)
17 19
 #
18 20
 
19 21
 auto_gen=lex.yy.c cfg.tab.c   #lexx, yacc etc
... ...
@@ -21,11 +23,20 @@ auto_gen=lex.yy.c cfg.tab.c   #lexx, yacc etc
21 23
 #include  source related defs
22 24
 include Makefile.sources
23 25
 
24
-override exclude_modules:=CVS cpl cpl-c ext extcmd mangler nathelper pdt \
25
-								postgres snmp  \
26
-							jabber sms pa  msilo im radius_acc radius_auth \
27
-							auth_radius group_radius uri_radius \
28
-							$(exclude_modules)
26
+#extra modules to exclude
27
+skip_modules?=
28
+
29
+# if not set on the cmd. line or the env, exclude this modules:
30
+exclude_modules?= 			cpl cpl-c ext extcmd mangler nathelper pdt \
31
+							postgres snmp  \
32
+							im radius_acc radius_auth \
33
+							jabber sms pa  msilo \
34
+							auth_radius group_radius uri_radius 
35
+# always exclude the CVS dir
36
+override exclude_modules+= CVS $(skip_modules)
37
+
38
+#always include this modules
39
+include_modules?=
29 40
 
30 41
 # first 2 lines are excluded because of the experimental or incomplete
31 42
 # status of the modules
... ...
@@ -42,6 +53,8 @@ DEFS=$(static_defs)
42 53
 modules=$(filter-out $(addprefix modules/, \
43 54
 			$(exclude_modules) $(static_modules)), \
44 55
 			$(wildcard modules/*))
56
+modules:=$(filter-out $(modules), $(addprefix modules/, $(include_modules) )) \
57
+			$(modules)
45 58
 modules_names=$(shell echo $(modules)| \
46 59
 				sed -e 's/modules\/\([^/ ]*\)\/*/\1.so/g' )
47 60
 modules_basenames=$(shell echo $(modules)| \
... ...
@@ -5,7 +5,8 @@
5 5
 # Environment variables:
6 6
 #   PREFIX, LOCALBASE, BASEDIR
7 7
 #   INSTALL, TAR , CC, LEX, YACC,
8
-#   CPU, CC_EXTRA_OPTS
8
+#   CPU, CC_EXTRA_OPTS,
9
+#   exclude_modules, skip_modules, include_modules
9 10
 #
10 11
 # History:
11 12
 # --------