Subject: Re: Potentially unnecessary redoing of targets

From: Sergey Matveev <[email-masked]>
Date: Tue, 13 Jan 2026 11:23:00 +0300

Greetings!

*** Niklas Böhm [2026-01-12 16:12]:
>What I would suggest is to check, once more, if the targets
>actually did change their content before launching `2.do`.

redo just do not work that way. If it determines that "2" is
OOD (because it depends on "1", that depends on altered "1.do"),
then it runs 2.do. It does not run 1.do, but 2.do, that *may*
run 1.do. Even if we saw that result of "1" target was not
changed, we already executing 2.do anyway, maybe somewhere in
the middle of its code, with various steps already done before
encountering "redo-ifchange 1" in it.

spacefrogg perfectly explained all of that (and other issues,
like premature "1.do" execution) in details indeed.

Here is the crucial difference in behaviour between Make and
redo: Make, if 2 is OOD, will run 1(.do). Redo will run 2.do,
that may run 1.do.

-- 
Sergey Matveev (http://www.stargrave.org/)
LibrePGP: 12AD 3268 9C66 0D42 6967  FD75 CB82 0563 2107 AD8A