summaryrefslogtreecommitdiff
path: root/Makefile.moddir_rules
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2010-03-23 14:22:27 +0000
committerKevin P. Fleming <kpfleming@digium.com>2010-03-23 14:22:27 +0000
commitae6008ef3acdb582aca60357f7a7870aabba78a1 (patch)
tree97e4ea6000f94d030759102e139a2646e75100f6 /Makefile.moddir_rules
parentf9e4d024c91387de1e189ed92675bb2193d9afb6 (diff)
Change per-file debug and verbose levels to be per-module, the way
users expect them to work. 'core set debug' and 'core set verbose' can optionally change the level for a specific filename; however, this is actually for a specific source file name, not the module that source file is included in. With examples like chan_sip, chan_iax2, chan_misdn and others consisting of multiple source files, this will not lead to the behavior that users expect. If they want to set the debug level for chan_sip, they want it set for all of chan_sip, and not to have to also set it for reqresp_parser and other files that comprise the chan_sip module. This patch changes this functionality to be module-name based instead of file-name based. To make this work, some Makefile modifications were required to ensure that the AST_MODULE definition is present in each object file produced for each module as well. Review: https://reviewboard.asterisk.org/r/574/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'Makefile.moddir_rules')
-rw-r--r--Makefile.moddir_rules10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile.moddir_rules b/Makefile.moddir_rules
index 72d4c2a8b..00494a8b5 100644
--- a/Makefile.moddir_rules
+++ b/Makefile.moddir_rules
@@ -54,10 +54,16 @@ endif
# Both C++ and C++ sources need their module name in AST_MODULE
# We also pass whatever _INCLUDE list is generated by menuselect
-# (they are stored in file 'makeopts')
+# (they are stored in file 'makeopts'). This is also necessary
+# for components used to build modules, which can't be determined
+# by the rules in this file, so the MOD_ASTCFLAGS definition
+# is used to collect the required flags for a module... which can
+# then be used any place they are required.
+
+MOD_ASTCFLAGS=-DAST_MODULE=\"$(1)\" $(MENUSELECT_OPTS_$(1):%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$(value $(dep)_INCLUDE))
$(addsuffix .oo,$(CC_MODS)) $(addsuffix .o,$(C_MODS)): \
- _ASTCFLAGS+= -DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
+ _ASTCFLAGS+=$(call MOD_ASTCFLAGS,$*)
ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
# don't define -fPIC on mingw32 and cygwin, it is the default