[Top][All Lists]

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

Re: Appending to builtin Automake variables from an included file

From: Ralf Wildenhues
Subject: Re: Appending to builtin Automake variables from an included file
Date: Tue, 3 Mar 2009 23:46:25 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

* Allan Caffee wrote on Tue, Mar 03, 2009 at 07:00:47PM CET:
>       am/
> distclean-am-hook:
>       -rm -rf Doxyfile doc/html
> # ...
>       am/
> distclean-am-hook:
>       -rm -f template.spec
> # ...
> include $(top_srcdir)/am/
> include $(top_srcdir)/am/
> In such a case Automake could rename these targets to
> am--distclean-am-hook-1 and am--distclean-am-hook-2 respectively and add
> them to as dependencies of distclean-am.

automake should not rename things; that always leads to no end of
trouble.  The contents of should more or less be copied
literally to its output, with `include' expanded of course.  Any new
semantics leading further away from this are bad.

Really, a functioning solution within current automake already exists.

include ...

and all snippets but the first only append to the magic variables, and
initialize those that are property of the snippet only.

For cleanup, you can add a convention that no snippet overwrite the
documented -local/-hook targets, but only add prerequisites to them.
That won't help you in all cases, but most of them.

  distclean-local: distclean-local-doxygen
  .PHONY: distclean-local-doxygen

Hope that helps.


reply via email to

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