bug-make
[Top][All Lists]
Advanced

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

Re: make -q and timestamps


From: Paul Eggert
Subject: Re: make -q and timestamps
Date: Sat, 13 Aug 2011 19:12:38 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11

On 08/13/2011 03:02 PM, Bruno Haible wrote:
> is it possible to extend GNU Make in a way that supports this? Possibly
> by defining a new kind of special built-in target?

Well, one can imagine a new special target .TIME, say,
which would look like this:

.TIME: foo.h

foo.h: a b c etc
        generate a b c etc >address@hidden
        cmp $@ address@hidden || cp address@hidden $@

The idea is that a target foo.h that .TIME depends on would
have special semantics: for the purpose of the rule
creating foo.h, its timestamp is that of foo.h.time, but for
the purpose of rules depending on foo.h, foo.h's timestamp is
that of the file foo.h itself.

There are downsides to this approach.  A standard
'make' that does not understand .TIME would needlessly
reexecute the foo.h rule every time one does a 'make',
and a tarball built with the new GNU Make would preserve this
problem in its timestamps.  It'd be nice if someone could
think of a way to overcome these downsides.

I'll CC: this to address@hidden to see if there's any interest
in pursuing a better solution.  Bug-make readers, this is in response to
<http://lists.gnu.org/archive/html/bug-gnulib/2011-08/msg00108.html>
on the bug-gnulib list.



reply via email to

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