help-make
[Top][All Lists]
Advanced

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

Re: non-recursive build question


From: Boris Kolpackov
Subject: Re: non-recursive build question
Date: Thu, 29 Apr 2004 15:40:21 +0000 (UTC)
User-agent: nn/6.6.5+RFC1522

"Paul D. Smith" <address@hidden> writes:
 
> There is an order of magnitude difference between the suggestions you
> give here and what make currently does, and that is that all the ideas
> you give here require state to be stored.  Make is currently stateless:
> it has no knowledge of when (or even if) it was ever run before and if
> it was, what happened then.
> 
> In order to implement _ANY_ more advanced out-of-dateness condition than
> what we have now, make would first have to be enhanced to be stateful.

I thought we already can do something very close to this:

.SUFFIXES:
MAKEFLAGS += -r

foo.o: foo.c

%.o: %.c.md5
        $(CC) -o $@ -c $(<:.md5=)

%.c.md5: %.c
        @md5sum $< | cmp -s $@ -; if test $$? -ne 0; then md5sum $< > $@; fi

.PRECIOUS: %.c.md5


And it looks very similar to how automatic dependency generation works.
The advantage of this approach is that you can implement whatever out-
dateness logic one could imagine.

any comments?
-boris





reply via email to

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