Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Dec 2002 16:49:18 +0200
From:      Peter Pentchev <roam@ringlet.net>
To:        Andrey Beresovsky <and@rsu.ru>
Cc:        hackers@FreeBSD.ORG, Oleg Sharoiko <os@rsu.ru>
Subject:   Re: Need to override KRNLCONFDIR variable in command line of make (file /usr/src/Makefile.inc1).
Message-ID:  <20021203144918.GJ365@straylight.oblivion.bg>
In-Reply-To: <20021203141510.D611-100000@moon.cc.rsu.ru>
References:  <20021203141510.D611-100000@moon.cc.rsu.ru>

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

--WuT04sMzYDXq8et0
Content-Type: text/plain; charset=windows-1251
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Dec 03, 2002 at 05:37:34PM +0300, Andrey Beresovsky wrote:
>=20
> Hello,
>=20
> I am developing a program which will allow me to build worlds and kernels=
 for
> several hosts with different options (make.conf files, kernel configs and=
 so on).
> I need to be able to override some variables in /usr/src/Makefile.inc1. F=
or the
> moment they are defined with '=3D', and I suggest defining them with '?=
=3D'. The
> variables I need to override are KRNLSRCDIR, KRNLCONFDIR, KRNLOBJDIR. I h=
ave
> sent PR (misc/45961) with patch to solve my request.
>=20
> Please, anyone who has a commit rights, commit this patch.

I was wondering about that when I saw your PR; actually, I think that
the current FreeBSD kernel building infrastructure is quite sufficient
for what you want to do, without any more modifications.

To use different make.conf settings, you have three options:
- use the same make.conf file, but with .ifdef FOO ... .endif blocks,
  containing per-host configuration variables;
- use a single simple make.conf file with .ifdef FOO /
  .include make.foo.conf / .endif blocks, with different make.foo.conf
  files for the different hosts;
- set the (slightly underdocumented) __MAKE_CONF variable to a different
  value.

To use different kernel configs, just set the KERNCONF variable to the
value you need.

The object directory is set according to the KERNCONF value - if you
have different kernel config file names, you will have different object
directories.

Why do you need different source trees and kernel config dirs?  I see no
problem with keeping all kernel configs for the same version of FreeBSD
in the same src/sys/<arch>/conf/ directory, or at least keeping symlinks
to different files in the same src/sys/<arch>/conf/ directory.

Different source trees - if you have a source tree checked out to use
for building the kernel, what is stopping you from invoking the
'buildkernel' target from the corresponding src/ directory, the one
directly above the sys/ directory?

Of course, I am probably overlooking some aspects, or missing
information about your particular configuration.  Still, I believe that
for most configurations, the already-provided variables and build
infrastructure are quite sufficient.

G'luck,
Peter

--=20
Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
What would this sentence be like if pi were 3?

--WuT04sMzYDXq8et0
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE97MRu7Ri2jRYZRVMRAiy5AJ0TWtObo68leZ1jw+R3HyHvZtvQewCgiwIA
YrbLatszVq6xE4qztB0cx3Q=
=3ran
-----END PGP SIGNATURE-----

--WuT04sMzYDXq8et0--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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