Date: Mon, 23 Aug 2004 11:10:18 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Michael Nottebrock <michaelnottebrock@gmx.net> Cc: mi@aldan.algebra.com Subject: Re: port breakage with recent make Message-ID: <20040823081018.GJ59140@ip.net.ua> In-Reply-To: <200408210545.46358.michaelnottebrock@gmx.net> References: <200408210545.46358.michaelnottebrock@gmx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--E6lVPAHcXg6biC3t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 21, 2004 at 05:45:42AM +0200, Michael Nottebrock wrote: > science/hdf breaks with the latest make(1). What it does seems innocent= =20 > enough: It passes PREFIX via MAKE_ARGS to the main Makefile (MAKE_ARGS=3D= =20 > PREFIX=3D"${PREFIX}") and the main Makefile has: >=20 > LIBDIR ?=3D ${PREFIX}/lib > BINDIR ?=3D ${PREFIX}/bin >=20 > .MAKEFLAGS: PREFIX=3D${PREFIX} LIBDIR=3D${LIBDIR} BINDIR=3D${BINDIR} >=20 > It does some more redefinitions of LIBDIR and BINDIR (with references to= =20 > PREFIX ...) in Makefiles further down (the ports seems to replace the=20 > autotools Makefiles rather completely with custom-made ones), but there's= =20 > nothing that looks like it should undefine or change PREFIX. Is the port= =20 > wrong or make? >=20 Recent make(1) just exposed a bug in a port. Here's what happens here. bsd.port.mk passes LIBDIR=3D/usr/lib in environment: : (cd /usr/ports/science/hdf/work/HDF4.1r5 && \ : /usr/bin/env SHELL=3D/bin/sh PORTOBJFORMAT=3Delf \ : PREFIX=3D/usr/local LOCALBASE=3D/usr/local X11BASE=3D/usr/X11R6 \ : MOTIFLIB=3D"-L/usr/X11R6/lib -lXm -lXp" \ : LIBDIR=3D"/usr/lib" \ : CFLAGS=3D"-O -pipe " \ : CXXFLAGS=3D" -O -pipe " \ : MANPREFIX=3D"/usr/local" \ : BSD_INSTALL_PROGRAM=3D"install -c -s -o root -g wheel -m 555" \ : BSD_INSTALL_SCRIPT=3D"install -c -o root -g wheel -m 555" \ : BSD_INSTALL_DATA=3D"install -c -o root -g wheel -m 444" \ : BSD_INSTALL_MAN=3D"install -c -o root -g wheel -m 444" \ : make -f Makefile PREFIX=3D"/usr/local" -j 2 install) Port's makefile does this: : # cat /usr/ports/science/hdf/files/Makefile : # $FreeBSD: ports/science/hdf/files/Makefile,v 1.1 1999/11/14 02:32:03 st= eve Exp $ :=20 : SUBDIR =3D hdf mfhdf man : #PREFIX ?=3D /usr/local : LIBDIR ?=3D ${PREFIX}/lib : BINDIR ?=3D ${PREFIX}/bin :=20 : .MAKEFLAGS: PREFIX=3D${PREFIX} LIBDIR=3D${LIBDIR} BINDIR=3D${BINDIR} :=20 : test: all : # testing in hdf : @cd hdf && ${MAKE} hdf-test : # testing in mfhdf : @cd mfhdf && ${MAKE} test :=20 : .include <bsd.subdir.mk> So, Makefile sees /usr/lib and passes it as a command-line variable (using .MAKEFLAGS), as requested. Old make(1) was buggy and did not pass this variable as a command-line variable. New make(1) does the required thing, so LIBDIR ends up being set to /usr/lib. The fix is trivial: %%% Index: Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/ports/science/hdf/files/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- Makefile 14 Nov 1999 02:32:03 -0000 1.1 +++ Makefile 23 Aug 2004 08:08:00 -0000 @@ -2,8 +2,8 @@ =20 SUBDIR =3D hdf mfhdf man #PREFIX ?=3D /usr/local -LIBDIR ?=3D ${PREFIX}/lib -BINDIR ?=3D ${PREFIX}/bin +LIBDIR =3D ${PREFIX}/lib +BINDIR =3D ${PREFIX}/bin =20 .MAKEFLAGS: PREFIX=3D${PREFIX} LIBDIR=3D${LIBDIR} BINDIR=3D${BINDIR} =20 %%% Feel free to commit it. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --E6lVPAHcXg6biC3t Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQFBKaZqqRfpzJluFF4RAvgBAJ9jaNfWUlMh6I0cbUujjZBlOytZ1wCfS+91 GQXoFecOoYB3zf3WCgSwcfk= =mlSS -----END PGP SIGNATURE----- --E6lVPAHcXg6biC3t--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040823081018.GJ59140>