On 2025-10-13 15:50, Yclept Nemo wrote: > As a variation of [1], I am trying to implement auto-dependency generation > without tracking a list of sources (SRCS). I've managed to get everything > working on make 4.4, and with a few hacks everything except empty recipe > forcing for pattern rules on make 3.8.2. Specifically, I am trying to > effect the following for pattern rules: > > """ > If a rule has no prerequisites or recipe, and the target of the rule is a > nonexistent file, then make imagines this target to have been updated > whenever its rule is run. This implies that all targets depending on this > one will always have their recipe run. > """ > > I've sketched out a few various test-cases, none of which work. Is it > possible to get this working on 3.8.2?
Do you mean 3.82? Make 3.8.2 would have to be very old! The oldest GNU Make version carried by GNU mirror sites is 3.75, released August 1996. 3.82 is from 2010, now fifteen years old. Are you sure you need a 100% working dependency system working on GNU Make 3.82? Working so well that you can remove a header file without getting the "no rule to make target foo.h" error due to it being mentioned in a dependency make include file? Dependencies are only needed when you are /developing/ on a system, not when you are only /supporting/ it in the sense that you can do a clean build of your project. Because when you are developing, you benefit from having accurate, reliable incremental rebuilds, and that's what requires the detailed dependencies. A working clean build from scratch doesn't require detailed header file dependencies, only the minimal dependencies to connect the pieces: e.g. .o depending on corresponding .c, program depending on .o's. If the dependency generation works on the older system, except for corner cases like removing header files, that's got to be good enough beyond caring.
