bug-make
[Top][All Lists]
Advanced

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

Did change in remake.c break the .SECONDARY behaviour?


From: Lutz Vieweg
Subject: Did change in remake.c break the .SECONDARY behaviour?
Date: Tue, 17 Jul 2001 12:58:33 +0200

Hi Paul,

sorry to bother you with such an ancient change you made - it is
documented in the ChangeLog of GNU make:

1999-09-03  Paul D. Smith  <address@hidden>

        * remake.c (notice_finished_file): Always set mtime_before_update
        if it's not been set, not just if we ran some rules.  Otherwise we
        may have a situation where a target's prerequisite was rebuilt but
        not changed, so this target's rules weren't run, then
        update_goal_chain() sees mtime_before_update != last_mtime and
        thinks that the top-level target changed when it really didn't.
        This can cause an infinite loop when remaking makefiles.
        (update_goal_chain): If we get back to the top and we don't know
        what the goal's last_mtime was, find it now.  We need to know so
        we can compare it to mtime_before_update later (this is only
        crucial when remaking makefiles--should we only do it then?)

My problem is that I always used dependencies like this:

foo.cxx: foo.h sub/bar.h

.SECONDARY: foo.cxx

to tell make that something that depends on foo.cxx needs to be remade
whenever foo.h or sub/bar.h changes.

Of course, foo.cxx should never be changed by any command make invokes.

You may ask why I don't write a rule that directly tells make what
foo.o depends on - well, the reason is simply that there are several
.o files built from each .cxx file with different compiler flags etc -
and it wouldn't be fun to write the same rule for each .o file again..

>From make 3.77 to version 3.78 (and later) the behaviour of make changed so
this doesn't work anymore: Now, make does _not_ remake foo.o when
e.g. sub/bar.h changes.

I'm desperately searching for any clean solution of this problem - it
was so easy with .SECONDARY before - isn't there any way to tell
make  "foo.cxx depends on foo.h, but foo.cxx won't change because of it,
only other files that depend on foo.cxx need to be remade"?

Regards,

Lutz Vieweg

--
 Dipl. Phys. Lutz Vieweg | email: address@hidden
 Innovative Software AG  | Phone/Fax: +49-69-505030 -120/-505
 Feuerbachstrasse 26-32  | http://www.isg.de/people/lkv/
 60325 Frankfurt am Main | ^^^ PGP key available here ^^^

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

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