Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Oct 2008 10:46:31 +0300
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        Srinivas <mboxindia@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Usage of "files" for config
Message-ID:  <OEHZ1tqoEDjrOeMc2HFlSDyjinQ@ycxwUD7qGgJ%2BeGkrCSeKiWGxBdk>
In-Reply-To: <e6a0706a0810271522h4669359at47710cbb8f4ed2c@mail.gmail.com>
References:  <e6a0706a0810271522h4669359at47710cbb8f4ed2c@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <m-file-name>.c and <m-file-name>.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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?OEHZ1tqoEDjrOeMc2HFlSDyjinQ>