Autor: Jethro R Binks Data: Dla: Exim Users Temat: Re: [exim] Macros in include files
On Thu, 22 Jan 2015, Robert Blayzor wrote:
> On Jan 22, 2015, at 11:15 AM, Jeremy Harris <jgh@???> wrote:
> >
> > Interesting question. There's not a testcase in the testsuite for
> > that as far as I can see, but from a glance around the source you
> > ought to be able to define macros within an included file.
> >
> > Unfortunately there's not any debug output on a new macro definition.
> >
> > Is this what you're asking? Or are you asking about expansion of
> > macros?
>
>
> Well yes. The documentation says macro expansion happens BEFORE include
> files are pulled in. I would read that as if include file has a macro
> they won't be processed. I guess it's an order of operations thing.
I have a .include statement for a file whose contents defines macros,
which are used later on in the config.
The included file does not try and use any macros itself, don't think I
have ever tried that.
However, the .include statement itself does make use of a macro, so
clearly that parsing has already happened at the top level.
.include EXIMDIR/hostconfig.thishost
I guess you'd need another pass of macro parsing after doing includes, and
if there is nesting going on that could get fun.
Jethro.
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks, Network Manager,
Information Services Directorate, University Of Strathclyde, Glasgow, UK
The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263.