[svn-commits] branch group/new_loader_completion r29507 - in /team/group/new_loader_complet...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon May 22 12:42:29 MST 2006


Author: kpfleming
Date: Mon May 22 14:42:28 2006
New Revision: 29507

URL: http://svn.digium.com/view/asterisk?rev=29507&view=rev
Log:
teach modules what their actual names are, so that loader commands can reference them once they have been loaded (especially useful for embedded modules)

Modified:
    team/group/new_loader_completion/apps/Makefile
    team/group/new_loader_completion/cdr/Makefile
    team/group/new_loader_completion/channels/Makefile
    team/group/new_loader_completion/codecs/Makefile
    team/group/new_loader_completion/formats/Makefile
    team/group/new_loader_completion/funcs/Makefile
    team/group/new_loader_completion/include/asterisk/module.h
    team/group/new_loader_completion/pbx/Makefile
    team/group/new_loader_completion/res/Makefile

Modified: team/group/new_loader_completion/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/Makefile?rev=29507&r1=29506&r2=29507&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/Makefile (original)
+++ team/group/new_loader_completion/apps/Makefile Mon May 22 14:42:28 2006
@@ -22,7 +22,9 @@
 #CFLAGS+=-DEXTENDED_ODBC_STORAGE
 # See doc/README.odbcstorage for more information
 
-all: $(MODS)
+$(foreach mod,$(patsubst %.so,%,$(MODS)),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(patsubst %.o,%,$@)\"
+
+all: depend $(MODS)
 
 clean-depend:
 	rm -f .depend

Modified: team/group/new_loader_completion/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/cdr/Makefile?rev=29507&r1=29506&r2=29507&view=diff
==============================================================================
--- team/group/new_loader_completion/cdr/Makefile (original)
+++ team/group/new_loader_completion/cdr/Makefile Mon May 22 14:42:28 2006
@@ -34,6 +34,8 @@
     endif
   endif
 endif
+
+$(foreach mod,$(patsubst %.so,%,$(MODS)),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(patsubst %.o,%,$@)\"
 
 all: depend $(MODS)
 

Modified: team/group/new_loader_completion/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/channels/Makefile?rev=29507&r1=29506&r2=29507&view=diff
==============================================================================
--- team/group/new_loader_completion/channels/Makefile (original)
+++ team/group/new_loader_completion/channels/Makefile Mon May 22 14:42:28 2006
@@ -61,6 +61,8 @@
 ifndef PWLIBDIR
   PWLIBDIR=$(HOME)/pwlib
 endif
+
+$(foreach mod,$(patsubst %.so,%,$(MODS)),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(patsubst %.o,%,$@)\"
 
 all: depend $(MODS) 
 

Modified: team/group/new_loader_completion/codecs/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/codecs/Makefile?rev=29507&r1=29506&r2=29507&view=diff
==============================================================================
--- team/group/new_loader_completion/codecs/Makefile (original)
+++ team/group/new_loader_completion/codecs/Makefile Mon May 22 14:42:28 2006
@@ -31,6 +31,8 @@
 endif
 
 LIBLPC10=lpc10/liblpc10.a
+
+$(foreach mod,$(patsubst %.so,%,$(MODS)),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(patsubst %.o,%,$@)\"
 
 all: depend $(MODS)
 

Modified: team/group/new_loader_completion/formats/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/formats/Makefile?rev=29507&r1=29506&r2=29507&view=diff
==============================================================================
--- team/group/new_loader_completion/formats/Makefile (original)
+++ team/group/new_loader_completion/formats/Makefile Mon May 22 14:42:28 2006
@@ -14,6 +14,8 @@
 MODS:=$(filter-out $(MENUSELECT_FORMATS),$(patsubst %.c,%.so,$(wildcard format_*.c)))
 
 GSMLIB=../codecs/gsm/lib/libgsm.a
+
+$(foreach mod,$(patsubst %.so,%,$(MODS)),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(patsubst %.o,%,$@)\"
 
 all: depend $(MODS)
 

Modified: team/group/new_loader_completion/funcs/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/funcs/Makefile?rev=29507&r1=29506&r2=29507&view=diff
==============================================================================
--- team/group/new_loader_completion/funcs/Makefile (original)
+++ team/group/new_loader_completion/funcs/Makefile Mon May 22 14:42:28 2006
@@ -24,7 +24,9 @@
   endif
 endif
 
-all: $(MODS)
+$(foreach mod,$(patsubst %.so,%,$(MODS)),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(patsubst %.o,%,$@)\"
+
+all: depend $(MODS)
 
 clean-depend:
 	rm -f .depend

Modified: team/group/new_loader_completion/include/asterisk/module.h
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/include/asterisk/module.h?rev=29507&r1=29506&r2=29507&view=diff
==============================================================================
--- team/group/new_loader_completion/include/asterisk/module.h (original)
+++ team/group/new_loader_completion/include/asterisk/module.h Mon May 22 14:42:28 2006
@@ -293,7 +293,9 @@
 
 	int (*unload)(void);	/* unload. called with the module locked */
 
-	const char *description;		/* textual id of the module. */
+	const char *name;			/* name of the module for loader reference and CLI commands */
+
+	const char *description;		/* user friendly description of the module. */
 
 	/*! 
 	 * This returns the ASTERISK_GPL_KEY, signifiying that you agree to the terms of
@@ -327,9 +329,10 @@
 		load_func,				\
 		unload_func,				\
 		reload_func,				\
-		desc,				\
+		AST_MODULE,				\
+		desc,					\
 		keystr,					\
-		flags_to_set			\
+		flags_to_set				\
 	};							\
 	static void  __attribute__ ((constructor)) __reg_module(void) \
 	{ \
@@ -355,6 +358,7 @@
 
 #define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)	\
 	const static struct ast_module_info __mod_info = {	\
+		.name = AST_MODULE,				\
 		.flags = { flags_to_set },			\
 		.description = desc,				\
 		.key = keystr,					\

Modified: team/group/new_loader_completion/pbx/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/pbx/Makefile?rev=29507&r1=29506&r2=29507&view=diff
==============================================================================
--- team/group/new_loader_completion/pbx/Makefile (original)
+++ team/group/new_loader_completion/pbx/Makefile Mon May 22 14:42:28 2006
@@ -18,6 +18,8 @@
 KDE_LIBS=-L$(KDEDIR)/lib -L$(QTDIR)/lib -lqt -lkdecore -lkdeui
 
 KDE_CONSOLE_OBJS=pbx_kdeconsole_main.o pbx_kdeconsole.o 
+
+$(foreach mod,$(patsubst %.so,%,$(MODS)),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(patsubst %.o,%,$@)\"
 
 all: depend $(MODS)
 

Modified: team/group/new_loader_completion/res/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/res/Makefile?rev=29507&r1=29506&r2=29507&view=diff
==============================================================================
--- team/group/new_loader_completion/res/Makefile (original)
+++ team/group/new_loader_completion/res/Makefile Mon May 22 14:42:28 2006
@@ -33,6 +33,8 @@
 else
   SNMP_LDLIBS+=$(shell net-snmp-config --agent-libs)
 endif
+
+$(foreach mod,$(patsubst %.so,%,$(MODS)),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(patsubst %.o,%,$@)\"
 
 all: depend $(MODS)
 



More information about the svn-commits mailing list