Prev | Current Page 139 | Next

Bryan Costales, Claus Assmann, George Jansen, Gregory Shapiro

"sendmail, 4th Edition"

One way to do this might be to add the following lines to
your m4 build file:
APPENDDEF(`conf_sendmail_ENVDEF', `-DMYCODE')
APPENDDEF(`confBEFORE', `mycode.h')
APPENDDEF(`confSMOBJADD', `mycode.o')
PUSHDIVERT(3)
mycode.h mycode.c:
ln -s /usr/local/src/mycode/$@
POPDIVERT
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc. All rights reserved.
2.7 Build m4 Macro Reference | 71
The first line adds -DMYCODE to the ENVDEF= line in Makefile (?§2.7.14 on page 75). Here, we
presume that C-language hooks have been added to the sendmail source, and that they are
enabled/disabled by wrapping them in preprocessor conditionals.* For example:
# ifdef MYCODE
if (mycode(e->e_eid) < 0)
return FALSE;
# endif
The second line in your m4 file appends mycode.h to this confBEFORE macro. The third line
causes the OBJADD= directive in Makefile to be given the value mycode.o (?§2.7.47 on page
93). This automatically adds that object filename to the list of all object files in Makefile:
... util.o version.o ${OBJADD}
Finally, the diversion adds Makefile commands to ensure that the symbolic links to the
required C-language source files exist before sendmail is compiled.
2.7.3 confBLDVARIANT
Controls variations on objects Build macro
This confBLDVARIANT Build macro is used to convey to the make program a notion of how
the compile should run.


Pages:
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
życzenia katalog stron katalog stron pozycjonowanie Connie Talbot