From owner-freebsd-current Sun Mar 9 10:49:21 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0EBB37B401 for ; Sun, 9 Mar 2003 10:49:19 -0800 (PST) Received: from mail.flugsvamp.com (ts46-01-qdr3643.mdfrd.or.charter.com [68.118.36.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24F4543FB1 for ; Sun, 9 Mar 2003 10:49:19 -0800 (PST) (envelope-from jlemon@flugsvamp.com) Received: (from jlemon@localhost) by mail.flugsvamp.com (8.12.6/8.12.6) id h29Imm4S028389; Sun, 9 Mar 2003 12:48:48 -0600 (CST) (envelope-from jlemon) Date: Sun, 9 Mar 2003 12:48:48 -0600 (CST) From: Jonathan Lemon Message-Id: <200303091848.h29Imm4S028389@mail.flugsvamp.com> To: leafy@leafy.idv.tw, current@freebsd.org Subject: Re: How does a module decide what to support? X-Newsgroups: local.mail.freebsd-current In-Reply-To: Organization: Cc: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article you write: >From my observations (yes, please correct me if I am wrong), that >modules define what to support in their respective makefiles in the form >of > >SRC= aaa.c bbb.c opt_*.h > >Where opt_*.h are automagically generated if they are not in machine@ >(and the generated files are just empty files that indicate that the >kernel file does not specify this option), else they are linked from >machine@. > >If some makefile list >SRC= a.c b.c opt_inet.h opt_inet6.h >and kernel config lists 'option INET' *only*, then opt_inet.h has >'#define INET 1' in it and opt_inet6.h is empty. > >Is this correct? Yes, I believe so. This is why module makefiles should explicitly create the opt_* files with the #define set, so the module supports all options. See the recent commits I did to the if_tun module, for example (thanks for pointing it out). -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message