[Top][All Lists]

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

Re: how to extend the Makefile templates?

From: Harald Dunkel
Subject: Re: how to extend the Makefile templates?
Date: Wed, 17 Aug 2005 10:15:57 +0200
User-agent: Debian Thunderbird 1.0.2 (X11/20050402)

Hi Ralf,

Ralf Wildenhues wrote:
> Hi Harald,
> * Harald Dunkel wrote on Tue, Aug 16, 2005 at 12:39:46PM CEST:
>>I would need some way to add recursive targets to all generated
>>Makefiles, without asking every owner of every
>>to append some include statement or some keyword to be replaced
> Hmm.  I remember you asking a similar question before.

Kevin Teich started a thread about this in April. But
the issue wasn't resolve, AFAIR.

>>What would be your suggestion to solve this?
> I don't have a good answer to your specific question at the moment
> (short of extending Automake).  But I have a suggestion for questions
> such as yours:
> For other people (e.g. me), requirements such as above would be much
> easier to understand if a good reason for it was given as well.
> I mean, what is it that prevents you from doing something like this
>   find $top_srcdir -name | while read file
>   do
>     echo 'include $top_srcdir/' >>"$file"
>   done

This would assume that I am allowed to change the foreign files, it assumes that this command wasn't
run before, and it assumes that there is no AC_CONFIG_SUBDIRS.

If something like this is supposed to be run, then it
should work on the generated files. (That
would be the job of automake, anyway.) The
would have to be converted into in
$(top_srcdir), and this would break the $(top_srcdir)
variable for all Makefiles in subdirectories.

I would like to add recursive targets to extend the test
framework (e.g. to not stop testing completely if a
single unittest fails in a subdirectory deep inside), or
to recursively create a coverage report, to add common
build targets for the documentation, and so on.

My suggestion would be something like this: Some macro in

                go here

It could be used to create targets "mytarget" and "mytarget-am"
as for the existing recursive targets, to add mytarget-recursive
to $(RECURSIVE_TARGETS), to add it to .PHONY, and so on.

Of course this might introduce problems, too (e.g. when using
recursive targets in the dependencies). It would be necessary
to document the difference between "install" and "install-am",
for example.



reply via email to

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