automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Include directive for all generated Makefile.in


From: Steffen Dettmer
Subject: Re: Include directive for all generated Makefile.in
Date: Wed, 14 Apr 2010 11:53:56 +0200

On Wed, Apr 14, 2010 at 7:53 AM, Ralf Wildenhues <address@hidden> wrote:
> > would it be a potential possibility instead to `overwrite and
> > specialize' some macro?
>
> With "some macro", you mean "some prepended or appended makefile.am
> snippet" here, right?
>
> Well, my idea of the above would be that if you used
>  AM_MAKEFILE_APPEND([bot1])
 [...]

Yes, of course. The idea is good!

> Do you have a good use case for this overwriting (that would
> justify this complication)?

No, I don't have any.

It's just that some of our (completely unrelated) source
generation tools (written in Perl) internally use some to write
content. First we had some prepend/append hooks but later found
it stronger to overwrite the content writing functions.
For example, when having some

   @lines = (header(), content(), footer());
   writeFile(@lines);

sometimes maybe content() could be overwritten to some

   # comment out a block
   sub overloadedContent() {
     @content = content(); # or self->SUPER::content()
     map { $_ = "# $_" } @content; # or whatever
     return @content;
   }

or replace some identifiers inside, remove something or alike.
Probably all this are examples of DONT-DOs because relying on
internals that change without prior notice.

But I think this is out of scope here. Much too complicated and
it would be more customizing automake than using a feature of it.

oki,

Steffen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]