[Cluster-devel] [RFC/PATCH] Collecting common Makefile snippets

Fabio Massimo Di Nitto fabbione at ubuntu.com
Mon Aug 27 07:19:58 UTC 2007


The patch in attachment is just a working example.

The general idea is to start to collect all common Makefile targets into
their own makefile snippets now that most of the Makefiles share lots of common
targets.

Pro:
- It will allow us to change common bits in one place and they will be
automatically propagated all over the tree instead of having to change N Makefiles.
- General Makefiles will be much smaller.
- It will still be possible to special case bits here and there. (from this
example patch you can look at gfs/Makefile and fence/agents/Makefile that are
not touched by the patch).
- It will be possible to override targets in local Makefiles.

Cons:
- When creating new makefiles you need to know which snippets to include.
- When reading a makefile you need to remember what targets are automatically
sourced from a snippet.


Cheers
Fabio

-- 
I'm going to make him an offer he can't refuse.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: collect.diff
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070827/b9f3fd10/attachment.ksh>


More information about the Cluster-devel mailing list