From owner-freebsd-new-bus Thu Nov 18 1:42:34 1999 Delivered-To: freebsd-new-bus@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 18C4E14BEC for ; Thu, 18 Nov 1999 01:42:29 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from p132-ts5.syd2.zeta.org.au (beefcake.zeta.org.au [203.26.10.12]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id UAA29460; Thu, 18 Nov 1999 20:49:16 +1100 Date: Thu, 18 Nov 1999 20:42:14 +1100 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: Warner Losh Cc: new-bus@FreeBSD.ORG Subject: Re: Makefile module cleanup In-Reply-To: <199911180648.XAA22839@harmony.village.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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