Source-Changes archive

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

CVS commit: basesrc/usr.bin/make



Module Name:    basesrc
Committed By:   pk
Date:           Thu Feb  7 16:48:23 UTC 2002

Modified Files:
        basesrc/usr.bin/make: compat.c make.c

Log Message:
When making a node which is the source of both a .MADE target and a
normal target (the latter dependency being the reason why it's made),
the .MADE parent should not be put on the `toBeMade' list again (in
Make_Update()) since it was already put on it in Make_ExpandUse().
Doing so would cause the rules for the .MADE target to be executed
(at least) twice, and also mess up the unmade children count of _its_
parent, resulting in spurious graph cylce detection.

To achieve this, make sure the unmade children count of the .MADE target
is set to zero before enqueueing it on the `toBeMade' list in
Make_ExpandUse(). Then, in Make_Update(), check if the parent has the
.MADE attribute before diddling with the queue.

For the same reason the status of a node must not be set to UPTODATE
unconditionally in compat mode, since that will prevent the node from
being built even if it is the source of a normal target. Instead,
check both its state and the type of the parent to decide whether to
continue on behalf of the current parent.


To generate a diff of this commit:
cvs rdiff -r1.39 -r1.40 basesrc/usr.bin/make/compat.c
cvs rdiff -r1.41 -r1.42 basesrc/usr.bin/make/make.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index