Subject: Re: PREVIOUSTOOLDIR question
To: Martin Weber <Ephaeton@gmx.net>
From: Luke Mewburn <lukem@NetBSD.org>
List: tech-toolchain
Date: 03/17/2004 09:45:20
--t0UkRYy7tHLRMCai
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Mar 16, 2004 at 10:38:47PM +0100, Martin Weber wrote:
  | Hoi tool wizards,
  |=20
  | I have a build.sh question concerning PREVIOUSTOOLDIR.
  |=20
  | So I've fetched src via cvs, and asked build.sh to build a fresh set
  | of tools for me:
  |=20
  |  # ./build.sh -T /usr/tools -M /space/obj -D /usr/dest tools
  |=20
  | then I've asked it to do some building...
  |=20
  |  # ./build.sh -T /usr/tools -M /space/obj -D /usr/dest distribution
  |=20
  | ...and the first thing it does is realize that PREVIOUSTOOLDIR (=3D '')
  | is not TOOLDIR (=3D /usr/tools), and begins with building the tools=20
  | again ? (Cleaning stuff, dependall, now it's sitting somewhere in gcc).

This doesn't occur in the general case.  Do you have any mk.conf
settings, environment variables, or other build.sh options you're
using and not displaying, that may affect the build?
What does
	# ./build.sh -T /usr/tools -M /space/obj -D /usr/dest params
show?


  | Do I get it right that to have your tools built once you have to build
  | them twice ? Next time I maybe try ./build.sh ... -V PREVIOUSTOOLDIR=3D=
/usr/tools
  | and see what happens.=20

Don't do that; it is definitely unsupported to manipulate PREVIOUSTOOLDIR
manually.


  | PREVIOUSTOOLDIR is not documented in BUILDING btw. Nor in UPDATING.
  | Can the not-source-code-diver please get a short doc on this, please ?

PREVIOUSTOOLDIR was implemented to prevent the issues where the
the path to TOOLDIR has changed; in that case the tools should be
cleaned & rebuilt because there were problems with some tools
(including groff, if I recall correctly) hard-coding paths under
TOOLDIR and these programs were breaking when TOOLDIR was changed
(e.g, when the host uname changes after a kernel version bump
and you're using the default TOOLDIR).

For some reason your "PREVIOUSTOOLDIR" file isn't getting built
in the correct location; it should be in the .OBJDIR of src/tools.
There were problems with parallel builds and PREVIOUSTOOLDIR
a while ago but that has been fixed.


Cheers,
Luke.

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD8DBQFAV4OApBhtmn8zJHIRAnNoAKCAJfofnWH/Lt7V+EEHnj1uQt0oOQCglVC2
Y1/aPu361guBBg8lXdcM30o=
=Twri
-----END PGP SIGNATURE-----

--t0UkRYy7tHLRMCai--