Subject: Re: how to "make" a target in a different pkgsrc directory?
To: None <tech-pkg@NetBSD.org>
From: Alistair Crooks <agc@pkgsrc.org>
List: tech-pkg
Date: 10/13/2007 10:11:47
On Sat, Oct 13, 2007 at 03:02:36AM +0200, Klaus Heinz wrote:
> Hi,
> 
> the following example
> 
>   SOME_PKGSRCDIR=foo/bar
> 
>   pre-extract:
>     set -e; cd ${.CURDIR}/../../${SOME_PKGSRCDIR}; make configure
> 
>   post-clean:
>     set -e; cd ${.CURDIR}/../../${SOME_PKGSRCDIR}; make clean
> 
> works for "make clean" but not for "make extract". The result of
> "make extract" is mostly (if the distfile for bar-08.15 is available
> locally): 
> 
>   $ make extract
>   ...
>   ===> Extracting for bla-1.0
>   set -e; cd /usr/pkgsrc/bla/bla/../../foo/bar; make configure
>   ===> Overriding tools for bar-08.15
>   ...
>   ===> Creating toolchain wrappers for bar-08.15
>   make: don't know how to make generate-wrappers. Stop
> 
> I suppose this kind of "reach-over" configuration or build is not
> supported.
> Is there some other way I can make a target in a different pkgsrc directory?

There used to be packages that used that kind of reachover method, but
we managed to get rid of them all.  It's not really the way we wanted
to do things.

These days, if you need something as a pre-requisite for a build, it
should be a real, fully-fledged pre-requisite by means of a DEPENDS
or buildlink3.mk inclusion (and thence to DEPENDS).

If the pre-req is worthwhile having as part of the build process, it
deserves to be a first-class citizen, so let's install it, and
manipulate it with the pkg_install tools.

Regards,
Alistair