make-alpha
[Top][All Lists]
Advanced

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

A simple patch.


From: Ramón García
Subject: A simple patch.
Date: Fri, 13 Apr 2007 03:14:19 +0200

This patch is just to show my experimentation. It causes make to use
the variable .OUT_OF_DATE, evaluated as an expression, for evaluating
when to rebuild a target.

I see one inconvenient with this approach: variables are inherited
from targets to prerequisites. This is useful for setting CFLAGS for a
target to change the compilation of all prerequisites, but for
.OUT_OF_DATE it ensues unconvenient. With the simple Makefile that I
am attaching, it breaks the build, because the .OUT_OF_DATE (which is
always true) propagates to the leaves, and causes them to be out ot
date. I find this propagation surprising. I suggest to add some syntax
to express whether a variable assignment in a target should propagated
downward.

I am also attaching a simple trivial test. You should touch b1 and c1
before trying it. You will see that it does not build correctly with
the patched make for the reason explained.

Attachment: make.diff
Description: Text Data

Attachment: Makefile
Description: Binary data


reply via email to

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