From owner-freebsd-hackers Thu Dec 20 23:31:37 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 83F1A37B419; Thu, 20 Dec 2001 23:31:09 -0800 (PST) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id fBL7UV041888; Fri, 21 Dec 2001 09:30:31 +0200 (EET) (envelope-from ru) Date: Fri, 21 Dec 2001 09:30:30 +0200 From: Ruslan Ermilov To: The Anarcat Cc: freebsd-arch@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: making /usr/share/mk apps PREFIX-independant??? Message-ID: <20011221093030.D39918@sunbay.com> References: <20011220183103.GH2956@shall.anarcat.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011220183103.GH2956@shall.anarcat.dyndns.org> User-Agent: Mutt/1.3.23i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Dec 20, 2001 at 01:31:04PM -0500, The Anarcat wrote: > [posted to -arch, and CC'd to hackers since I have no idea as to where > this belongs, please redirect if necessary] > > Hi. > > As a developper working in the FreeBSD/ports paradigm, and developping > exclusively for FreeBSD through the libh project, it has come to my > attention that applications developped through /usr/share/mk Makefiles > (in particular bsd.prog.mk and bsd.lib.mk) do not respect PREFIX. > > That is, the libh Makefiles, as set now, install in /usr no matter what. > There is no real alternative. Setting DESTDIR will install in > /${DESTDIR}/usr, without changing the PREFIX (/usr). > > In other words, apps developped using /usr/share/mk makefiles are > incompatible with the ports collection PREFIX-independance paradigm. > > That sucks. > > This is a problem which must be solved. As a hack, the libh port uses a > custom install target in the ports skeleton (ie, it doesn't use libh > install targets). > > How I see it, the .mk files must be hacked. One could try such a replace > pattern, I guess: s!install(.*)${DESTDIR}!install\1${PREFIX}/${DESTDIR}! > > I tried to produce a significant patch, and I failed. I do not > understand how some files end up in /bin and some other in /usr/bin. > > If someone can help me with that, I will happily start hacking on the mk > files, but in the meantime, I'm lost. > I'm against PREFIX in share/mk files. Instead, just setting DESTDIR=${PREFIX} should (almost) be enough. Another set of "hacks" might be required for *DIR settings, like LIBDIR=/lib, MANDIR=/man, etc. Just adding the PREFIX wouldn't solve these differences between / and /usr/local anyway. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message