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, 06 Nov 2022 11:18:25 -0500
Greg Troxel <gdt%lexort.com@localhost> wrote:

> What does "include file is not found" mean?   Do you mean "foo.h is a
> dependency of bar.c, but foo.h does not exist, and there is no rule to
> make foo.h?"   If so, why aren't there rules?  If not, please clarify.

The feature that is suggested is to make this work:

---8<---
on-the-fly.mk:
	printf ".PHONY: greet\ngreet:\n\t@echo Hello, world\n" > $@

.include "on-the-fly.mk"
---8<---
$ make greet

This works with GNU make if you change the include line to
"include on-the-fly.mk".

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 ...

Kind regards,
-Tobias


Home | Main Index | Thread Index | Old Index