From f12244be9e06b29a8f18b80d32a69d92e32d9f9b Mon Sep 17 00:00:00 2001 From: Satoshi Asami Date: Wed, 10 Apr 1996 06:32:42 +0000 Subject: [PATCH] Describe usage of LOCALBASE and X11BASE in relation with PREFIX. --- handbook/porting.sgml | 51 +++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/handbook/porting.sgml b/handbook/porting.sgml index 6043b8db6f..c132b5d274 100644 --- a/handbook/porting.sgml +++ b/handbook/porting.sgml @@ -1,4 +1,4 @@ - + Porting an existing piece of free software @@ -156,7 +156,7 @@ The pattern is the year followed by the month. # Date created: 5 December 1994 # Whom: asami # - # $Id: porting.sgml,v 1.17 1996-03-25 09:35:25 asami Exp $ + # $Id: porting.sgml,v 1.18 1996-04-10 06:32:42 asami Exp $ # DISTNAME= oneko-1.1b @@ -864,20 +864,39 @@ FETCH_DEPENDS= ncftp2:${PORTSDIR}/net/ncftp2 PREFIX

Do try to make your port install relative to - ${PREFIX} in your Makefiles. This will - normally be set to /usr/local, or - /usr/X11R6 if ${USE_IMAKE} or - ${USE_X11} is set, though it can be - reassigned in your Makefile or in the users environment, if - need be. + ${PREFIX}. (The value of this variable will be + set to ${LOCALBASE} (default + /usr/local), unless ${USE_IMAKE} or + ${USE_X11} is set, in which case it will be + ${X11BASE} (default /usr/X11R6).) -

Not hard-coding /usr/local anywhere in your - installation will make the port much more flexible and cater - to the needs of other sites. Note that this doesn't count - for package `packing list' files since they have their own - scheme for relocating themselves and can be left independent - of ${PREFIX} unless the package is one that - hard-codes itself to a compiled-in location. +

Not hard-coding `/usr/local' or `/usr/X11R6' + anywhere in the source will make the port much more flexible and + able to cater to the needs of other sites. For X ports that use + imake, this is automatic; otherwise, this can often be done by + simply replacing the occurrences of `/usr/local' (or + `/usr/X11R6' for X ports that don't use imake) in the + various scripts/Makefiles in the port to read + `${PREFIX}', as this variable is automatically + passed down to every stage of the build and install processes. + +

The variable ${PREFIX} can be reassigned in your + Makefile or in the user's environment. However, it is strongly + discouraged for individual ports to set this variable explicitly + in the Makefiles. (If your port is an X port but doesn't use + imake, set USE_X11=yes; this is quite different from + setting PREFIX=/usr/X11R6.) + +

Also, refer to programs/files from other ports with the + variables mentioned above, not explicit pathnames. For instance, + if your port requires a macro PAGER to be the full + pathname of less, use the compiler flag: + `-DPAGER=\"${PREFIX}/bin/less\"' (or + `-DPAGER=\"${LOCALBASE}/bin/less\"' if this is an + X port), instead of `-DPAGER=\"/usr/local/bin/less\"'. + This way it will have a better chance of working if the system + administrator has moved the whole `/usr/local' tree somewhere + else. Subdirectories @@ -958,7 +977,7 @@ lib/libtcl.so.7.3 person who wrote this Makefile] # Whom: Satoshi Asami # - # $Id: porting.sgml,v 1.17 1996-03-25 09:35:25 asami Exp $ + # $Id: porting.sgml,v 1.18 1996-04-10 06:32:42 asami Exp $ [ ^^^^ don't worry about this...it will be automatically filled in by CVS when it is committed to our repository] #