On Mar 12, 2009 at 19:04, Henning Westerholt <henning.westerholt(a)1und1.de> wrote:
On Thursday 12 March 2009, Jan Janak wrote:
is there
any equivalent to the "exlude_modules" parameter in
Makefiles.defs in the sr tree? For some modules that are contained in the
'all' branch of 'kamailio-3.0' i don't have dependencies installed,
and i
would like to skip them on 'make all'.
There is no need to modify the makefile. You can do:
$ make config exclude_modules="abc"
and the makefile system will remember that you wanted to exclude the module
from compilation every time you run 'make all'.
You can specify more modules separated by white space in the value of
exclude_modules above.
Hi Jan,
thanks for the pointer, thats a cool feature. Some things i noticed during my
tests of the 'kamailio-3.0' branch: It seems that the library dependencies of
the modules are recompiled again for every module. I thought you fixed
something in this regards in the main branch, perhaps this is not yet
integrated into this? But i don't remember exactly, its of course not a big
issue.
It's fixed, but for ser :-)
The problem is that we always save all the options a module or a lib was
compiled with and then on re-compile we check if the options (defines)
have changed. If they did => recompile everything.
This avoids problems like compiling a module with -DDBG_QM_MALLOC, then
doing some change and compiling without it (which without this extra
check might work but will produce coredumps at runtime).
The DEFS and INCLUDES are saved in makecfg.lst in each modules or lib
directory.
The problem with libs re-compiling happens because the list of lib
defines changes as new modules using the lib are compiled. This happens
because of the different DEFS in different modules (when a module
makefile calls the lib makefile its local DEFS will be passed to the
lib).
In ser we don't use modules DEFS so much so we haven't seen it so far.
We either need a long list of DEFS excluded from the checks (that don't
trigger a recompile), or a separate way to specify "local" DEFS, just
for modules or libs (e.g. using MOD_DEFS instead of DEFS).
Also we must eliminate abuses like using DEFS for passing includes,
compiler options a.s.o.
A more problematic bug i run into is that the
compilation of
the 'perl' module run into a endlees loop during the make, because i don't
have the necessary dependencies installed, and make somehow don't detects
that the compilation fails.
It's because of DEFS+=`perl -MExtUtils::Embed -e ccopts` in the module
Makefile. This causes the saved DEFS to be different (they will containt
"`perl -MExtUtils::Embed -e ccopts`") from the ones actually used
(the output of `perl -MExtUtils::Embed -e ccopts`). No substitution can
be used in DEFS.
A simple way to fix it is to replace:
DEFS+=`perl -MExtUtils::Embed -e ccopts`
with
PERLCCOPST=$(shell perl -MExtUtils::Embed -e ccopts)
DEFS+=$(PERLCCOPTS)
I'll try to think of a solution for using separate DEFS names for modules,
libs, and common part.
Andrei