aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-11-05 11:19:23 +0200
committerSergey Poznyakoff <gray@gnu.org>2018-11-05 11:19:23 +0200
commit29583de41d70ec5ef37e87fa1ddddc0f7a15539f (patch)
tree2d2c8763b5df90ce8f642bb99c54ba6a50e49117
parent53d0561ca828459d280cbfa5d2b3950e133da81e (diff)
downloadmailfromd-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
-rw-r--r--src/builtin/Makefile.am2
-rw-r--r--src/builtin/snarf.m412
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
@@ -79,17 +79,17 @@ AM_CPPFLAGS = \
-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
@@ -74,30 +74,30 @@ __mf_define_fun([<$1>])>])
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:
*
@@ -941,28 +941,28 @@ 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:

Return to:

Send suggestions and report system problems to the System administrator.