How to build kernel module spread on subdirectories?
Tim Kientzle
kientzle at freebsd.org
Sun Nov 30 16:22:59 PST 2008
Nikola Knežević wrote:
> As I described in my initial mail, I have to use two makefiles. One is
> the main Makefile, while the other has to be generated. In the
> generated .mk, I add to the SRCS, and I create the .PATH target with
> other (necessary) directories. Unfortunately, make depend doesn't work
> as it should be.
> .MAKEFILEDEPS: elements.mk
>
> .sinclude "elements.mk"
> .include <bsd.kmod.mk>
> --->8---
>
> When I run make depend, it only includes SRCSs from BSDmakefile, not
> those from elements.mk.
I would try adding a "beforedepend" requirement:
beforedepend: elements.mk
Look at /usr/share/mk/bsd.dep.mk, which has the 'make depend'
logic. It supports optional "beforedepend" and "afterdepend"
targets.
Tim
More information about the freebsd-hackers
mailing list