Prev | Current Page 1022 | Next

Bryan Costales, Claus Assmann, George Jansen, Gregory Shapiro

"sendmail, 4th Edition"

For example:
define(`DOWN??, `R DOL(*) < @ $1 > DOL(*) DOL(1) < @ $2 > DOL(2)??)
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc. All rights reserved.
17.2 Configure with m4 | 587
Here, we define the m4 macro named DOWN, which takes two arguments ($1 and
$2). Notice how the $ character has meaning to m4. This newly created DOWN
macro can then be used in one of your .m4 files, perhaps like this:
DOWN(badhost, outhost)
DOWN creates a rule by substituting the argument (badhost for the $1 in its definition,
and outhost) for the corresponding $2. The substitution looks like this:
R DOL(*) becomes ?†’ R $*
< @ $1 > becomes ?†’ < @ badhost >
DOL(*) becomes ?†’ $*
DOL(1) becomes ?†’ $1
< @ $2 > becomes ?†’ < @ outhost >
DOL(2) becomes ?†’ $2
After substitution, the following new rule is the result:
R $* < @ badhost > $* $1 < @ outhost > $2
The DOL m4 macro allowed the insertion of $ characters (such as $*) and protects
you from having the literal use of $ characters being wrongly interpreted by m4.
Needless to say, you should never redefine the DOL m4 macro.
17.2 Configure with m4
The process of building a sendmail configuration file begins by creating a file of m4
statements. Traditionally, the suffix for such files is .mc. Th ecf/cf directory contains
examples of many .mc files.


Pages:
1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034
katalog stron gry nowe dakolen dieta light Zjeżdżalnie dla dzieci warszawa