From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 28 07:46:35 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1870E106566C for ; Tue, 28 Oct 2008 07:46:35 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id B133E8FC13 for ; Tue, 28 Oct 2008 07:46:34 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=MwQ0b2J+Vb+61cVKdgMNNc3B8vlGycvOx6nP49FqNG/cz1SrJAFHG885E/ieDnDUfDcnn4ABStPvmaCjerDfgdzknF/bhJr7EgwYZc0jpPUYhU776cnExF/YejLQ5HWiGpNAz9T0Efx60L0QXbJ7JfRavgGN/Jh6v7Yku2ZNZJE=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1KujHc-0009JQ-PT; Tue, 28 Oct 2008 10:46:32 +0300 Date: Tue, 28 Oct 2008 10:46:31 +0300 From: Eygene Ryabinkin To: Srinivas Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Wfe1KbQWcwuymTys" Content-Disposition: inline In-Reply-To: Sender: rea-fbsd@codelabs.ru Cc: freebsd-hackers@freebsd.org Subject: Re: Usage of "files" for config X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 07:46:35 -0000 --Wfe1KbQWcwuymTys Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Srinivas, good day. Tue, Oct 28, 2008 at 03:52:35AM +0530, Srinivas wrote: > I would like to know the usage of files and files.[arch] in sys/conf. > Basically, I didnt get the advantage of having a common file for > compilation(like files) rather than an individual Makefile in each > subdirectory. 'files' and 'files.$ARCH' are the input directives for the config(8) utility. Makefile is produced with the help of these files. The rationale for having 'files' and 'files.$ARCH' is simple: there are platform-specific directives and common directives. >=20 > I have read makefile(of mkmakefile.c in config). What is the usage of > "standard", "optional" and "mandatory" and why it is followed by > device. Read comments from 'mkmakefile.c': ----- /* * If an entry is marked "mandatory", config will abort if it's * not called by a configuration line in the config file. Apart * from this, the device is handled like one marked "optional". */ ----- > What are .m files? What are they used for? They define module interfaces and are processed by the AWK script /sys/tools/makeobjops.awk. The output will be source and header files, named .c and .h. You can do 'ls *_if.[ch]' in the kernel build directory and examine some files to get a hint on what's going on. M-files are processed with the help of /sys/conf/kern.post.mk and /sys/conf/kmod.mk. > Why are some of the rules in the generated makefile *.ln like scsi_all.ln? These files are lint(1)'ed: see /sys/conf/kern.post.mk, search for LNFILES. > What is ${NORMAL_LINT} and ${NORMAL_C} in the generated makefile mean? 'make -V NORMAL_LINT' and 'make -V NORMAL_C' invoked from the kernel compilation directory should tell you about the values of these variables. They are defined by /sys/conf/kern.pre.mk, so you can examine it as well. --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual =20 )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook=20 {_.-``-' {_/ # --Wfe1KbQWcwuymTys Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkGw1cACgkQthUKNsbL7YglYQCeMAs/3VsUCnPmNWsIoZfpwO+9 ztEAoKbb9XRK6ecBNaNSLFT8ucpMQ/3v =X4FZ -----END PGP SIGNATURE----- --Wfe1KbQWcwuymTys--