[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fake confusion
On Thu, May 17, 2001 at 11:10:03AM -0400, Joe Abley wrote:
> Hi,
>
> I'm having a problem making a port install correctly. I have a Makefile
> that looks like this:
>
> # $OpenBSD: Makefile,v 1.2 2001/03/24 19:55:38 jakob Exp $
>
> COMMENT= optimise a list of route prefixes
>
> DISTNAME= aggregate-1.3
> CATEGORIES= net
> NEED_VERSION= 1.363
>
> MASTER_SITES= http://www.mfnx.net/public/
>
> MAINTAINER= Joe Abley <jabley@automagic.org>
>
> PERMIT_PACKAGE_CDROM= Yes
> PERMIT_PACKAGE_FTP= Yes
> PERMIT_DISTFILES_CDROM= Yes
> PERMIT_DISTFILES_FTP= Yes
>
> CONFIGURE_STYLE= gnu
>
> .include <bsd.port.mk>
>
> make configure runs configure in work/aggregate-1.3 with
> --prefix=/usr/local, which produces a work/foo/Makefile that contains:
>
> [...]
> prefix = /usr/local
> [...]
> install: $(PROGS)
> $(INSTALL) -m 0755 aggregate $(prefix)/bin/
> [etc]
>
> make build completes with no issues, but make install fails since
> the files the port produces aren't installed in work/fakei386/...,
> but in /usr/local, since that's what "make install" in
> work/aggregate-1.3/Makefile does:
Try
CONFIGURE_STYLE= gnu dest
`Normal' gnu automake stuff should heed DESTDIR, as per gnits standard,
but when it doesn't, gnu dest does the appropriate magic so that
you will get
prefix = $(DESTDIR)/usr/local
in your Makefile.
Note that, in case that don't work, you usually don't have to patch
the Makefile.
As I've said time and again, variables set on the command line *OVERRIDE*
Makefile contents, so if you were to set, say,
FAKE_FLAGS=prefix=${DESTDIR}${TRUEPREFIX}
then it would override the Makefile contents, and probably install happily
where you want it.