Subject: Re: Source files with matching .do file keep targets ood

From: Sergey Matveev <[email-masked]>
Date: Fri, 7 Aug 2026 11:56:50 +0300

*** Nik Boehm [2026-08-07 10:36]:
>I agree that if there is a file called a.ext.do then it would make sense.  With a default.ext.do file the usefulness is more debatable.

default*.do should not be any way different from non-default .do files.
It is just like "wildcard" .do.

>I would tend to say that there shouldn't be a reason to consider targets that depend on the source file a.ext to always be OOD.

Either I am missing something, or there is misuse of terms.
"source file" is a file, which is not generated by redo, which lacks any
corresponding .do file. For example having default.do means that there
can be no source files in the directory with it (or in subdirectories).
Either the target is generated, or it is "source file". Having foo.ext
and default.ext.do means that foo.ext is not treated like a source file,
but a valid target which redo must generate if it is OOD. If it lacks
dependency (.dep file) information, then redo treats it like "target has
not been done", it is non existent, so must be rebuilt.

>Surely the last line has to stay since otherwise every source file would always be OOD.  I don’t know if it makes sense to keep the second line with its current behavior.  What do you think?  I realize that it can be surprising that a target is not redone even though it has a .do file simply because it’s recorded as a source file.  But that is partly a user error.  Would it be possible to have a file depending on a.ext not be OOD?

If there is default.ext.do and a.ext was not build under redo (so it
misses the corresponding .redo/a.ext.dep) -- then it will be OOD, no
other choices.

>>    $ redo-depfix foo
>
>Why is the hash optional in those cases?

Because redo-depfix will recalculate it anyway.

-- 
 * Origin: Stargrave's homepage http://www.stargrave.org/