From owner-freebsd-current@FreeBSD.ORG Mon Aug 23 08:10:29 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51E4D16A4D5; Mon, 23 Aug 2004 08:10:29 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98AD043D46; Mon, 23 Aug 2004 08:10:28 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i7N8AGpI012501 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 23 Aug 2004 11:10:17 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id i7N8AIdZ062700; Mon, 23 Aug 2004 11:10:18 +0300 (EEST) (envelope-from ru) Date: Mon, 23 Aug 2004 11:10:18 +0300 From: Ruslan Ermilov To: Michael Nottebrock Message-ID: <20040823081018.GJ59140@ip.net.ua> References: <200408210545.46358.michaelnottebrock@gmx.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="E6lVPAHcXg6biC3t" Content-Disposition: inline In-Reply-To: <200408210545.46358.michaelnottebrock@gmx.net> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new cc: freebsd-current@FreeBSD.org cc: harti@FreeBSD.org cc: mi@aldan.algebra.com Subject: Re: port breakage with recent make X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2004 08:10:29 -0000 --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 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--