From owner-freebsd-doc Wed Jul 19 5:49:34 2000 Delivered-To: freebsd-doc@freebsd.org Received: from guru.mired.org (zoom1-179.telepath.com [216.14.1.179]) by hub.freebsd.org (Postfix) with SMTP id 015E737B517 for ; Wed, 19 Jul 2000 05:49:30 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 22510 invoked by uid 100); 19 Jul 2000 12:48:51 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14709.41907.882392.26159@guru.mired.org> Date: Wed, 19 Jul 2000 07:48:51 -0500 (CDT) To: doc@freebsd.org Subject: Porter's Handbook: Honoring PREFIX (15.12) and testing (2.4) X-Mailer: VM 6.72 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello all, Neither of the sections mentioned in the subject line talk about a simple test for honoring PREFIX/LOCALBASE that all ports should pass (but not all do, unfortunately :-(). This test has four steps: 1. make clean 2. make install PREFIX=/var/tmp/port-name 3. make deinstall Complaints about missing files indicate files that weren't properly installed according to PREFIX. 4. find /var/tmp/port-name -type f Shouldn't list any files. I haven't fully investigated how dependencies interact with this. In particular, some ports may need runtime dependencies installed with PREFIX=/var/tmp/port-name, which breaks the test for step 4 until all of them have been deinstalled as well. As a final note, the usage of PREFIX/LOCALBASE could be explained a bit better, along with adding X11BASE. According to my understanding, PREFIX is used to refer to where the current port is being installed; LOCALBASE is for things installed by non-X ports, and X11BASE for things installed by X ports. So the option -DPAGER=\"${PREFIX|/bin/less\" is actually wrong. Better wording for that would be: Also, refer to programs/files from other ports with the variables mentioned above, not explict pathnames. For instance, if your port requires the macro TOOL to be the full pathname to tool, use the compiler flag: -DTOOL=\"${LOCALBASE}/bin/tool\" unless it's an X tool, in which case use: -DTOOL=\"${X11BASE}/bin/tool\" instead of -DTOOL=\"/usr/local/bin/tool\". This way it will have a better chance of working if the system administrator has moved the whole '/usr/local' or '/usr/X11R6' tree somewhere else. Thanx,