Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Oct 1995 08:14:54 +0000 (GMT)
From:      Adam David <adam@veda.is>
To:        asami@cs.berkeley.edu (Satoshi Asami)
Cc:        ports@freebsd.org
Subject:   Re: nntp dependency
Message-ID:  <199510060814.IAA11823@veda.is>
In-Reply-To: <199510060212.TAA18875@forgery.CS.Berkeley.EDU> from "Satoshi Asami" at Oct 5, 95 07:12:25 pm

next in thread | previous in thread | raw e-mail | index | archive | help
>  * Is there an accepted convention for substituting variables such as
>  * ${PREFIX} into patchfiles? This port currently has /usr/local
>  * hardcoded at a deeper level, and I suspect there are other ports
>  * that suffer from the same problem.
> 
> The default do-build target will pass down PREFIX in the environment
> so if you can pick it up from there, it will be fine.  Just do a
> "CFLAGS += -DPREFIX=${PREFIX}" or something in the Makefile.
> 
> Satoshi

Not generic enough. A port might already #define PREFIX for another purpose,
and this would not make substitutions in scripts, only in .c and .h files.
I have seen some of the ports use a magic string to delineate hardcoded
substitutions into source files (using sed for instance). What I am asking
for is a documented convention, a recommended method.

--
Adam David <adam@veda.is>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510060814.IAA11823>