diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-11-05 11:19:23 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2018-11-05 11:19:23 +0200 |
commit | 29583de41d70ec5ef37e87fa1ddddc0f7a15539f (patch) | |
tree | 2d2c8763b5df90ce8f642bb99c54ba6a50e49117 /src | |
parent | 53d0561ca828459d280cbfa5d2b3950e133da81e (diff) | |
download | mailfromd-29583de41d70ec5ef37e87fa1ddddc0f7a15539f.tar.gz mailfromd-29583de41d70ec5ef37e87fa1ddddc0f7a15539f.tar.bz2 |
Change generation of debug names for built-in modules
* src/builtin/Makefile.am (.bi.c): Don't define SOURCE
* src/builtin/snarf.m4 (MF_SOURCE_DEBUG_NAME): Remove.
(MF_MODULE_DEBUG_NAME): New macro.
(_init_builtin): Use MF_MODULE_DEBUG_NAME
Diffstat (limited to 'src')
-rw-r--r-- | src/builtin/Makefile.am | 2 | ||||
-rw-r--r-- | src/builtin/snarf.m4 | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/builtin/Makefile.am b/src/builtin/Makefile.am index 7d5db661..e9ee8e20 100644 --- a/src/builtin/Makefile.am +++ b/src/builtin/Makefile.am @@ -67,29 +67,29 @@ EXTRA_DIST = \ snarf.m4 BUILT_SOURCES=\ $(BI_FILES:.bi=.c)\ builtin.h AM_CPPFLAGS = \ $(MAILUTILS_INCLUDES)\ $(MU_COMMON_INCLUDES)\ -I$(top_srcdir)/lib\ $(MILTER_INCLUDES)\ -I$(top_srcdir)/src\ -I$(top_srcdir)\ $(DSPAM_CFLAGS) builtin.h: Makefile.am builtin.def init.m4 $(BI_FILES:.bi=.c): snarf.m4 init.m4 SUFFIXES = .bi .c .def .h .mfi .mf M4=m4 .bi.c: - $(AM_V_GEN)$(M4) --prefix -s -DSOURCE="$<" $(top_srcdir)/src/builtin/snarf.m4 $< > $@ + $(AM_V_GEN)$(M4) --prefix -s $(top_srcdir)/src/builtin/snarf.m4 $< > $@ .def.h: $(AM_V_GEN) $(M4) --prefix $(top_srcdir)/src/builtin/init.m4 $(BI_FILES) $< > $@ diff --git a/src/builtin/snarf.m4 b/src/builtin/snarf.m4 index 2a32b02a..acb05ed9 100644 --- a/src/builtin/snarf.m4 +++ b/src/builtin/snarf.m4 @@ -62,54 +62,54 @@ m4_define([<$1>],[<__MF_DSEXP_REQ() * produce a warning if used in a context which is not safe for dataseg * expansion. */ m4_define([<MF_DSEXP_SUPPRESS>],[<m4_pushdef([<__mf_dataseg>],[</**/>]) $2 m4_popdef([<__mf_dataseg>]) __mf_define_fun([<$1>])>]) /* MF_MODULE_NAME() * ---------------- * Expand to the name of this module. */ m4_pushdef([<MF_MODULE_NAME>]) /* MF_BUILTIN_MODULE([NAME]) * ------------------------- * Start MFL built-in module text. Optional NAME is the name of the module. * If not supplied, the name is defined as the base name of the module file. */ m4_define([<MF_BUILTIN_MODULE>],m4_dnl [<m4_pushdef([<MF_MODULE_NAME>],m4_dnl m4_ifelse([<$1>],,[<m4_dnl m4_patsubst(m4___file__,\(.*/\)?\(.*\)\.bi,\2)>],[<$1>]))>])m4_dnl -/* MF_SOURCE_DEBUG_NAME(MODULE) - * ---------------------------- +/* MF_MODULE_DEBUG_NAME + * -------------------- * Expand to the "debug" name for the MODULE. */ -m4_define([<MF_SOURCE_DEBUG_NAME>],[<m4_dnl -m4_translit(m4_patsubst($1,\(.*/\)?\(.*\)\.bi,bi_\2),[<A-Z->],[<a-z_>])>]) +m4_define([<MF_MODULE_DEBUG_NAME>],[<m4_dnl +[<bi_>]m4_translit(MF_MODULE_NAME,[<A-Z->],[<a-z_>])>]) /* MF_MODULE_IDX() * --------------- * Expand to the BUILTIN_IDX_ constant for the current module. */ m4_define([<MF_MODULE_IDX>],[<m4_dnl [<BUILTIN_IDX_>]MF_MODULE_NAME()>]) /* __mf_argtype(arg) * ----------------- * Expand to Mailfromd value type code corresponding to ARG: * * __mf_argtype(STRING) => dtype_string * __mf_argtype(NUMBER) => dtype_number * __mf_argtype(POINTER) => dtype_pointer * __mf_argtype(anything) => dtype_unspecified */ m4_define([<__mf_argtype>],m4_dnl [<m4_ifelse($1,STRING,dtype_string,$1,NUMBER,dtype_number,m4_dnl $1,POINTER,dtype_pointer,m4_dnl dtype_unspecified)>]) /* mf_argtype(TYPE NAME) * --------------------- @@ -929,52 +929,52 @@ m4_divert(3)m4_dnl static mu_debug_handle_t debug_handle; m4_divert(2)>]) [<mu_debug>](debug_handle, $@)>])>]) m4_pushdef([<__MF_INIT_SEQUENCE>]) /* MF_INIT(CODE) * ------------- * Insert CODE into the initialization function for the * curent module (MODNAME_init_builtin). */ m4_define([<MF_INIT>],m4_dnl [<m4_pushdef([<__MF_INIT_SEQUENCE>],[<$1>])>]) /* Expand to the generated text upon the end of input. */ m4_m4wrap([< m4_ifelse(MF_MODULE_NAME,,[<m4_errprint([<MF_BUILTIN_MODULE is missing >]) m4_m4exit(1)>]) m4_undefine([<__MF_PRIV_ID__>])m4_dnl m4_ifdef([<__MF_COND_SYMBOL>],[<#endif /[<>]* __MF_COND_SYMBOL */ >]) void -MF_MODULE_NAME()_init_builtin() +MF_MODULE_NAME()_init_builtin(void) { m4_ifdef([<__MF_DEBUG>],[<m4_dnl - debug_handle = mu_debug_register_category("MF_SOURCE_DEBUG_NAME(SOURCE)"); + debug_handle = mu_debug_register_category("MF_MODULE_DEBUG_NAME"); >]) m4_ifdef([<__MF_COND_SYMBOL>],[<#ifdef __MF_COND_SYMBOL pp_define("__MF_COND_SYMBOL"); >])m4_dnl m4_undivert(1) __MF_INIT_SEQUENCE m4_popdef([<__MF_INIT_SEQUENCE>])m4_dnl m4_ifdef([<__MF_COND_SYMBOL>],[<#endif /[<>]* __MF_COND_SYMBOL */ m4_popdef([<__MF_COND_SYMBOL>])>])m4_dnl } m4_divert(0)m4_dnl /* -*- buffer-read-only: t -*- vi: set ro: THIS FILE IS GENERATED AUTOMATICALLY. PLEASE DO NOT EDIT. */ #ifdef HAVE_CONFIG_H # include <config.h> #endif #include <sys/types.h> #include "mailfromd.h" #include "prog.h" #include "builtin.h" m4_undivert(3) |