tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: make -- generate missing include files
On Sun, Nov 06, 2022 at 06:10:34PM +0100, Robert Clausecker wrote:
> > Is this feature supported by any BSD derived make? At least it doesn't
> > seem to work on FreeBSD. It looks difficult to implement because
> > parsing and target execution happen in separate stages ...
>
> The way I believe this is implemented is that when a missing include
> file is encountered, GNU make stops parsing and pretends the makefile
> ends right there. Then, make tries to build the missing include file
> as a target. If that succeeds, the parsing process is restarted from
> the top. Some logic is added to ensure that each iteration of a
> missing include makes progress, preventing infinite loops.
Nope, it reads the whole makefile ignoring the missing include. This
is apparently necessary because it's apparently allowed to have the
rule for building the include after the inclusion. Or to have it
depend on things that are after the inclusion.
(And as I noted earlier, it's fairly easy to set up an infinite loop.)
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index