aboutsummaryrefslogtreecommitdiff
path: root/src
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 /src
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
Diffstat (limited to 'src')
-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 = \
79 -I$(top_srcdir)\ 79 -I$(top_srcdir)\
80 $(DSPAM_CFLAGS) 80 $(DSPAM_CFLAGS)
81 81
82builtin.h: Makefile.am builtin.def init.m4 82builtin.h: Makefile.am builtin.def init.m4
83 83
84$(BI_FILES:.bi=.c): snarf.m4 init.m4 84$(BI_FILES:.bi=.c): snarf.m4 init.m4
85 85
86SUFFIXES = .bi .c .def .h .mfi .mf 86SUFFIXES = .bi .c .def .h .mfi .mf
87 87
88M4=m4 88M4=m4
89 89
90.bi.c: 90.bi.c:
91 $(AM_V_GEN)$(M4) --prefix -s -DSOURCE="$<" $(top_srcdir)/src/builtin/snarf.m4 $< > $@ 91 $(AM_V_GEN)$(M4) --prefix -s $(top_srcdir)/src/builtin/snarf.m4 $< > $@
92 92
93.def.h: 93.def.h:
94 $(AM_V_GEN) $(M4) --prefix $(top_srcdir)/src/builtin/init.m4 $(BI_FILES) $< > $@ 94 $(AM_V_GEN) $(M4) --prefix $(top_srcdir)/src/builtin/init.m4 $(BI_FILES) $< > $@
95 95
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>])>])
74m4_pushdef([<MF_MODULE_NAME>]) 74m4_pushdef([<MF_MODULE_NAME>])
75 75
76/* MF_BUILTIN_MODULE([NAME]) 76/* MF_BUILTIN_MODULE([NAME])
77 * ------------------------- 77 * -------------------------
78 * Start MFL built-in module text. Optional NAME is the name of the module. 78 * Start MFL built-in module text. Optional NAME is the name of the module.
79 * If not supplied, the name is defined as the base name of the module file. 79 * If not supplied, the name is defined as the base name of the module file.
80 */ 80 */
81m4_define([<MF_BUILTIN_MODULE>],m4_dnl 81m4_define([<MF_BUILTIN_MODULE>],m4_dnl
82[<m4_pushdef([<MF_MODULE_NAME>],m4_dnl 82[<m4_pushdef([<MF_MODULE_NAME>],m4_dnl
83m4_ifelse([<$1>],,[<m4_dnl 83m4_ifelse([<$1>],,[<m4_dnl
84m4_patsubst(m4___file__,\(.*/\)?\(.*\)\.bi,\2)>],[<$1>]))>])m4_dnl 84m4_patsubst(m4___file__,\(.*/\)?\(.*\)\.bi,\2)>],[<$1>]))>])m4_dnl
85 85
86/* MF_SOURCE_DEBUG_NAME(MODULE) 86/* MF_MODULE_DEBUG_NAME
87 * ---------------------------- 87 * --------------------
88 * Expand to the "debug" name for the MODULE. 88 * Expand to the "debug" name for the MODULE.
89 */ 89 */
90m4_define([<MF_SOURCE_DEBUG_NAME>],[<m4_dnl 90m4_define([<MF_MODULE_DEBUG_NAME>],[<m4_dnl
91m4_translit(m4_patsubst($1,\(.*/\)?\(.*\)\.bi,bi_\2),[<A-Z->],[<a-z_>])>]) 91[<bi_>]m4_translit(MF_MODULE_NAME,[<A-Z->],[<a-z_>])>])
92 92
93/* MF_MODULE_IDX() 93/* MF_MODULE_IDX()
94 * --------------- 94 * ---------------
95 * Expand to the BUILTIN_IDX_ constant for the current module. 95 * Expand to the BUILTIN_IDX_ constant for the current module.
96 */ 96 */
97m4_define([<MF_MODULE_IDX>],[<m4_dnl 97m4_define([<MF_MODULE_IDX>],[<m4_dnl
98[<BUILTIN_IDX_>]MF_MODULE_NAME()>]) 98[<BUILTIN_IDX_>]MF_MODULE_NAME()>])
99 99
100/* __mf_argtype(arg) 100/* __mf_argtype(arg)
101 * ----------------- 101 * -----------------
102 * Expand to Mailfromd value type code corresponding to ARG: 102 * Expand to Mailfromd value type code corresponding to ARG:
103 * 103 *
@@ -941,28 +941,28 @@ m4_define([<MF_INIT>],m4_dnl
941 [<m4_pushdef([<__MF_INIT_SEQUENCE>],[<$1>])>]) 941 [<m4_pushdef([<__MF_INIT_SEQUENCE>],[<$1>])>])
942 942
943/* Expand to the generated text upon the end of input. 943/* Expand to the generated text upon the end of input.
944 */ 944 */
945m4_m4wrap([< 945m4_m4wrap([<
946m4_ifelse(MF_MODULE_NAME,,[<m4_errprint([<MF_BUILTIN_MODULE is missing 946m4_ifelse(MF_MODULE_NAME,,[<m4_errprint([<MF_BUILTIN_MODULE is missing
947>]) 947>])
948m4_m4exit(1)>]) 948m4_m4exit(1)>])
949m4_undefine([<__MF_PRIV_ID__>])m4_dnl 949m4_undefine([<__MF_PRIV_ID__>])m4_dnl
950m4_ifdef([<__MF_COND_SYMBOL>],[<#endif /[<>]* __MF_COND_SYMBOL */ 950m4_ifdef([<__MF_COND_SYMBOL>],[<#endif /[<>]* __MF_COND_SYMBOL */
951>]) 951>])
952void 952void
953MF_MODULE_NAME()_init_builtin() 953MF_MODULE_NAME()_init_builtin(void)
954{ 954{
955 m4_ifdef([<__MF_DEBUG>],[<m4_dnl 955 m4_ifdef([<__MF_DEBUG>],[<m4_dnl
956 debug_handle = mu_debug_register_category("MF_SOURCE_DEBUG_NAME(SOURCE)"); 956 debug_handle = mu_debug_register_category("MF_MODULE_DEBUG_NAME");
957>]) 957>])
958m4_ifdef([<__MF_COND_SYMBOL>],[<#ifdef __MF_COND_SYMBOL 958m4_ifdef([<__MF_COND_SYMBOL>],[<#ifdef __MF_COND_SYMBOL
959 pp_define("__MF_COND_SYMBOL"); 959 pp_define("__MF_COND_SYMBOL");
960>])m4_dnl 960>])m4_dnl
961 m4_undivert(1) 961 m4_undivert(1)
962 __MF_INIT_SEQUENCE 962 __MF_INIT_SEQUENCE
963m4_popdef([<__MF_INIT_SEQUENCE>])m4_dnl 963m4_popdef([<__MF_INIT_SEQUENCE>])m4_dnl
964m4_ifdef([<__MF_COND_SYMBOL>],[<#endif /[<>]* __MF_COND_SYMBOL */ 964m4_ifdef([<__MF_COND_SYMBOL>],[<#endif /[<>]* __MF_COND_SYMBOL */
965m4_popdef([<__MF_COND_SYMBOL>])>])m4_dnl 965m4_popdef([<__MF_COND_SYMBOL>])>])m4_dnl
966} 966}
967m4_divert(0)m4_dnl 967m4_divert(0)m4_dnl
968/* -*- buffer-read-only: t -*- vi: set ro: 968/* -*- buffer-read-only: t -*- vi: set ro:

Return to:

Send suggestions and report system problems to the System administrator.