Date: Thu, 18 Nov 1999 20:42:14 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Warner Losh <imp@village.org> Cc: new-bus@FreeBSD.ORG Subject: Re: Makefile module cleanup Message-ID: <Pine.BSF.4.10.9911182021160.786-100000@alphplex.bde.org> In-Reply-To: <199911180648.XAA22839@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 17 Nov 1999, Warner Losh wrote:
>
> Right now nearly every makefile in the sys/modules tree has code that
> looks like:
>
> S = ${.CURDIR}/../..
> SRCS= ... device_if.h bus_if.h isa_if.h
> CLEANS+= device_if.h bus_if.h isa_if.h
>
> device_if.h: $S/kern/makedevops.pl $S/kern/device_if.m
> perl $S/kern/makedevops.pl -h $S/kern/device_if.m
>...
> Are there plans to make this more modular? I've cut and paste this
> same makefile code abotu 10 times now :-<.
I've complained to people who cut and paste this spam :-).
Plan:
- repository-copy bsd.kmod.mk and bsd.kern.mk to
sys/conf/maybe-better-names.mk.
- arrange to find bsd.kmod.mk there using searches like the ones now in
bsd.kmod.mk (only kernel makefiles and makefiles for modules in
sys/modules can use relative paths). May need a stub bsd.kmod.mk
in the standard place.
- put general rules like the one for device_if.h above in the
new bsd.kern.mk and remove them from module makefiles, kernel
makefiles, sys/conf/files and sys/${MACHINE}/conf/files.${MACHINE}.
- add support to the new bsd.kmod.mk for putting *_if.h in SRCS and
CLEANFILES as required. The VFS_KLD macro handles this well for
vfs modules, but modules are probably too diverse for a generalisation
of this to work well. I think I'll try requiring module makefiles
put the required foo_if.h's in SRCS.
Bruce
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-new-bus" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9911182021160.786-100000>
