Subject: Q re. sed prefix replacement
To: None <>
From: Georg Schwarz <>
List: tech-pkg
Date: 05/31/2004 11:56:22
At some instances in pkgsrc sed is used to cancel out ${PREFIX} from a
list of files.
devel/binutils/Makefile does so, for example, as do lang/gcc/Makefile,
lang/gcc-ssp/Makefile, lang/pgcc/Makefile, lang/gcc3-c/Makefile 
Wouldn't it be safer to use ^${PREFIX} instead of just ${PREFIX}? And/or
maybe not use a trailing g in the sed string? I am concerned that under
some circumstances (particularly if PREFIX is something short such as
/usr) more of the text than intended might be replaced/cancelled.
(it looks like databases/gnats/Makefile and mk/ do so

Another question: I noticed that SED is sometimes used with -e and
sometimes without. Can both be safely expected to work? 

Georg Schwarz     +49 177 8811442