Subject: Re: Fixing lots of my PRs (was Re: work.i386/.work.log missing?)
To: Hisashi T Fujinaka <htodd@twofifty.com>
From: Todd Vierling <tv@duh.org>
List: tech-pkg
Date: 01/26/2005 22:32:16
On Wed, 26 Jan 2005, Hisashi T Fujinaka wrote:

> > It seems that this problem is related to changes between rev. 1.1570
> > and rev. 1.1571 of mk/bsd.pkg.mk.  Since rev. 1.1571, PREPEND_PATH
> > is not added to PATH and BUILD_ENV.  Is this really OK?

> > +_PREPENDED_TO_PATH?=	# empty
> > +.for _dir_ in ${PREPEND_PATH}
> > +.  if empty(_PREPENDED_TO_PATH:M${_dir_})
> > +_PREPENDED_TO_PATH+=	${_dir_}
> > +PATH:=			${_dir_}:${PATH}
> > +.  endif
> > +.endfor
> > +
> > # Find out the PREFIX of dependencies where the PREFIX is needed at build
> > time.
> > .if defined(EVAL_PREFIX)
> > .  for def in ${EVAL_PREFIX}
> > @@ -1188,6 +1196,7 @@
> > # processes for build-related phases.
> > #
> > BUILD_ENV+=	PATH=${PATH:Q}
> > +BUILD_ENV+=	_PREPENDED_TO_PATH=${_PREPENDED_TO_PATH:Q}
> >
> > .MAIN: all
>
> This fixes PRs 29120, 29121, 29125, 29131.
>
> I'm cc'ing Thomas because he was looking into 29125, and tv since I
> think he was the last one to touch the file (but I'm often wrong about
> cvs logs).

I actually *removed* that bit because it doesn't allow PREPEND_PATH to be
used in a deferred manner -- something which will be required by the
derecursion work (and is now required by java-vm.mk, because it fixed
problems with the setting of CLASSPATH).  If you look at the block guarded
by ".if !defined(_PATH_ORIG)", you'll see that it sets PATH in BUILD_ENV,
but as a normal (not :=) variable assignment.

I'll look at the PRs now, and will try to reproduce the problem and fix it
correctly.

-- 
-- Todd Vierling <tv@duh.org> <tv@pobox.com>