Date: Wed, 15 Dec 2004 15:19:29 +0000 (UTC) From: naddy@mips.inka.de (Christian Weisgerber) To: freebsd-ports@freebsd.org Subject: Re: Beginner Question: Best way to substitute variables Message-ID: <cppkm1$l3r$1@kemoauc.mips.inka.de> References: <200412131138.iBDBceAj064131@moon.behrens>
next in thread | previous in thread | raw e-mail | index | archive | help
Frank Behrens <frank@pinky.sax.de> wrote: > What is the best way to set variables in scripts (e.g. pkg-install) > and text files (e.g. pkg-message) depending from Makefile variables > (e.g. PREFIX)? > Put all files in a separate directory, create Makefile dependencies > and replace the desired strings with "sed". But this seems to be not > the usual way, I could not find any example port. In fact, that is the usual way. Well, most ports probably don't bother with Makefile dependencies and just run the substitution from a configure/build/install rule. Try $ find /usr/ports -name Makefile | xargs grep pkg-install\\. /dev/null Among plenty of chaff, this turns up a number of ports that generate pkg-install from pkg-install.in etc. -- Christian "naddy" Weisgerber naddy@mips.inka.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cppkm1$l3r$1>